Public API¶
Sphinx extension to show default values in documentation.
Data:
Regular expression to match default values declared in docstrings. |
|
Regular expression to match fields in docstrings to suppress default values. |
Functions:
|
Format the value as a string. |
|
Returns a dictionary mapping argument names to parameters/arguments for a function. |
|
Obtains the default values for the arguments of a class. |
|
Obtains the default values for the arguments of a function. |
|
Prepare the formatting of the default value. |
|
Add default values to the docstring. |
|
Setup |
-
default_regex
¶ Type:
Pattern
Regular expression to match default values declared in docstrings.
Changed in version 0.6.0: Change to be case insensitive.
Pattern
^:(default)[ ]
-
get_arguments
(obj)[source]¶ Returns a dictionary mapping argument names to parameters/arguments for a function.
-
no_default_regex
¶ Type:
Pattern
Regular expression to match fields in docstrings to suppress default values.
Changed in version 0.6.0: Change to be case insensitive.
Pattern
^:(no[-_]default)[ ]
-
process_default_format
(app)[source]¶ Prepare the formatting of the default value.
- Parameters
app (
Sphinx
)