mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Create PyGroupedField and use it for 'exceptions'
This commit is contained in:
parent
bd5496aa61
commit
8c1a8153ca
1
AUTHORS
1
AUTHORS
@ -41,6 +41,7 @@ Other contributors, listed alphabetically, are:
|
|||||||
* Martin Mahner -- nature theme
|
* Martin Mahner -- nature theme
|
||||||
* Will Maier -- directory HTML builder
|
* Will Maier -- directory HTML builder
|
||||||
* Jacob Mason -- websupport library (GSOC project)
|
* Jacob Mason -- websupport library (GSOC project)
|
||||||
|
* Glenn Matthews -- python domain signature improvements
|
||||||
* Roland Meister -- epub builder
|
* Roland Meister -- epub builder
|
||||||
* Ezio Melotti -- collapsible sidebar JavaScript
|
* Ezio Melotti -- collapsible sidebar JavaScript
|
||||||
* Daniel Neuhäuser -- JavaScript domain, Python 3 support (GSOC)
|
* Daniel Neuhäuser -- JavaScript domain, Python 3 support (GSOC)
|
||||||
|
2
CHANGES
2
CHANGES
@ -75,6 +75,8 @@ Features added
|
|||||||
* #2680: `sphinx.ext.todo` now emits warnings if `todo_emit_warnings` enabled.
|
* #2680: `sphinx.ext.todo` now emits warnings if `todo_emit_warnings` enabled.
|
||||||
Also, it emits an additional event named `todo-defined` to handle the TODO
|
Also, it emits an additional event named `todo-defined` to handle the TODO
|
||||||
entries in 3rd party extensions.
|
entries in 3rd party extensions.
|
||||||
|
* Python domain signature parser now uses the xref mixin for 'exceptions',
|
||||||
|
allowing exception classes to be autolinked.
|
||||||
|
|
||||||
|
|
||||||
Bugs fixed
|
Bugs fixed
|
||||||
|
@ -106,6 +106,10 @@ class PyField(PyXrefMixin, Field):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class PyGroupedField(PyXrefMixin, GroupedField):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class PyTypedField(PyXrefMixin, TypedField):
|
class PyTypedField(PyXrefMixin, TypedField):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -130,9 +134,9 @@ class PyObject(ObjectDescription):
|
|||||||
names=('var', 'ivar', 'cvar'),
|
names=('var', 'ivar', 'cvar'),
|
||||||
typerolename='obj', typenames=('vartype',),
|
typerolename='obj', typenames=('vartype',),
|
||||||
can_collapse=True),
|
can_collapse=True),
|
||||||
GroupedField('exceptions', label=l_('Raises'), rolename='exc',
|
PyGroupedField('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')),
|
||||||
PyField('returntype', label=l_('Return type'), has_arg=False,
|
PyField('returntype', label=l_('Return type'), has_arg=False,
|
||||||
|
@ -93,7 +93,7 @@ Referring to :func:`nothing <>`.
|
|||||||
* expression
|
* expression
|
||||||
:returns: a new :class:`Time` instance
|
:returns: a new :class:`Time` instance
|
||||||
:rtype: Time
|
:rtype: Time
|
||||||
:raises ValueError: if the values are out of range
|
:raises Error: if the values are out of range
|
||||||
:ivar int hour: like *hour*
|
:ivar int hour: like *hour*
|
||||||
:ivar minute: like *minute*
|
:ivar minute: like *minute*
|
||||||
:vartype minute: int
|
:vartype minute: int
|
||||||
|
@ -207,6 +207,7 @@ HTML_XPATH = {
|
|||||||
# docfields
|
# docfields
|
||||||
(".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'),
|
(".//a[@class='reference internal'][@href='#TimeInt']/em", 'TimeInt'),
|
||||||
(".//a[@class='reference internal'][@href='#Time']", 'Time'),
|
(".//a[@class='reference internal'][@href='#Time']", 'Time'),
|
||||||
|
(".//a[@class='reference internal'][@href='#errmod.Error']/strong", 'Error'),
|
||||||
# C references
|
# C references
|
||||||
(".//span[@class='pre']", 'CFunction()'),
|
(".//span[@class='pre']", 'CFunction()'),
|
||||||
(".//a[@href='#c.Sphinx_DoSomething']", ''),
|
(".//a[@href='#c.Sphinx_DoSomething']", ''),
|
||||||
|
Loading…
Reference in New Issue
Block a user