Commits

Georg Brandl  committed 037fa3a

Fix doc field type roles.

  • Participants
  • Parent commits 330f1e6

Comments (0)

Files changed (2)

File sphinx/domains/c.py

     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

File sphinx/domains/python.py

         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):