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 = [
|
||||
TypedField('parameter', label=l_('Parameters'),
|
||||
names=('param', 'parameter', 'arg', 'argument'),
|
||||
typerolename='obj', typenames=('type',)),
|
||||
typerolename='type', typenames=('type',)),
|
||||
Field('returnvalue', label=l_('Returns'), has_arg=False,
|
||||
names=('returns', 'return')),
|
||||
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
|
||||
|
@ -45,16 +45,17 @@ class PyObject(ObjectDescription):
|
||||
TypedField('parameter', label=l_('Parameters'),
|
||||
names=('param', 'parameter', 'arg', 'argument',
|
||||
'keyword', 'kwarg', 'kwparam'),
|
||||
typerolename='obj', typenames=('type',)),
|
||||
typerolename='obj', typenames=('paramtype', 'type')),
|
||||
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',
|
||||
names=('raises', 'raise', 'exception', 'except'),
|
||||
can_collapse=True),
|
||||
Field('returnvalue', label=l_('Returns'), has_arg=False,
|
||||
names=('returns', 'return')),
|
||||
Field('returntype', label=l_('Return type'), has_arg=False,
|
||||
names=('rtype',), rolename='obj'),
|
||||
names=('rtype',)),
|
||||
]
|
||||
|
||||
def get_signature_prefix(self, sig):
|
||||
|
Loading…
Reference in New Issue
Block a user