mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix doc field type roles.
This commit is contained in:
parent
03d5917a53
commit
a6b1a17ad6
@ -50,11 +50,11 @@ class CObject(ObjectDescription):
|
|||||||
doc_field_types = [
|
doc_field_types = [
|
||||||
TypedField('parameter', label=l_('Parameters'),
|
TypedField('parameter', label=l_('Parameters'),
|
||||||
names=('param', 'parameter', 'arg', 'argument'),
|
names=('param', 'parameter', 'arg', 'argument'),
|
||||||
typerolename='obj', typenames=('type',)),
|
typerolename='type', typenames=('type',)),
|
||||||
Field('returnvalue', label=l_('Returns'), has_arg=False,
|
Field('returnvalue', label=l_('Returns'), has_arg=False,
|
||||||
names=('returns', 'return')),
|
names=('returns', 'return')),
|
||||||
Field('returntype', label=l_('Return type'), has_arg=False,
|
Field('returntype', label=l_('Return type'), has_arg=False,
|
||||||
names=('rtype',), rolename='obj'),
|
names=('rtype',)),
|
||||||
]
|
]
|
||||||
|
|
||||||
# These C types aren't described anywhere, so don't try to create
|
# These C types aren't described anywhere, so don't try to create
|
||||||
|
@ -45,16 +45,17 @@ class PyObject(ObjectDescription):
|
|||||||
TypedField('parameter', label=l_('Parameters'),
|
TypedField('parameter', label=l_('Parameters'),
|
||||||
names=('param', 'parameter', 'arg', 'argument',
|
names=('param', 'parameter', 'arg', 'argument',
|
||||||
'keyword', 'kwarg', 'kwparam'),
|
'keyword', 'kwarg', 'kwparam'),
|
||||||
typerolename='obj', typenames=('type',)),
|
typerolename='obj', typenames=('paramtype', 'type')),
|
||||||
TypedField('variable', label=l_('Variables'), rolename='obj',
|
TypedField('variable', label=l_('Variables'), rolename='obj',
|
||||||
names=('var', 'ivar', 'cvar')),
|
names=('var', 'ivar', 'cvar'),
|
||||||
|
typerolename='obj', typenames=('vartype',)),
|
||||||
GroupedField('exceptions', label=l_('Raises'), rolename='exc',
|
GroupedField('exceptions', label=l_('Raises'), rolename='exc',
|
||||||
names=('raises', 'raise', 'exception', 'except'),
|
names=('raises', 'raise', 'exception', 'except'),
|
||||||
can_collapse=True),
|
can_collapse=True),
|
||||||
Field('returnvalue', label=l_('Returns'), has_arg=False,
|
Field('returnvalue', label=l_('Returns'), has_arg=False,
|
||||||
names=('returns', 'return')),
|
names=('returns', 'return')),
|
||||||
Field('returntype', label=l_('Return type'), has_arg=False,
|
Field('returntype', label=l_('Return type'), has_arg=False,
|
||||||
names=('rtype',), rolename='obj'),
|
names=('rtype',)),
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_signature_prefix(self, sig):
|
def get_signature_prefix(self, sig):
|
||||||
|
Loading…
Reference in New Issue
Block a user