summaryrefslogtreecommitdiff
path: root/networkx
diff options
context:
space:
mode:
authorRoss Barnowski <rossbar@berkeley.edu>2021-08-14 19:17:40 +0300
committerGitHub <noreply@github.com>2021-08-14 12:17:40 -0400
commit2d1bf7072c1b71429442822eda69bd2c3c0065e1 (patch)
tree613bee261afb410fa7f595a7d63a2dea9b9335b0 /networkx
parenta30814db084d754f07e5c26720c8dfc4c175a835 (diff)
downloadnetworkx-2d1bf7072c1b71429442822eda69bd2c3c0065e1.tar.gz
Fix automatic documenting of class methods via autosummary (#5021)
* WIP: Autogenerate stubs for class methods. Modify default autosummary/classes template to auto-generate method stubs. * WIP: preserve special-casing of __init__. __init__ method of classes is embedded in main class doc and thus should be ignored in method autosummary. * Suppress sphinx warnings. * Remove manual autosummary of ismags methods * Escape some rst characters in argmap.signature docstring.
Diffstat (limited to 'networkx')
-rw-r--r--networkx/utils/decorators.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/networkx/utils/decorators.py b/networkx/utils/decorators.py
index f615bb04..a9dc032a 100644
--- a/networkx/utils/decorators.py
+++ b/networkx/utils/decorators.py
@@ -1076,6 +1076,8 @@ class argmap:
sig : argmap.Signature
The Signature of f
+ Notes
+ -----
The Signature is a namedtuple with names:
name : a unique version of the name of the decorated function
@@ -1084,8 +1086,8 @@ class argmap:
call_sig : a string used as code to call the decorated function
names : a dict keyed by argument name and index to the argument's name
n_positional : the number of positional arguments in the signature
- args : the name of the VAR_POSITIONAL argument if any, i.e. *theseargs
- kwargs : the name of the VAR_KEYWORDS argument if any, i.e. **kwargs
+ args : the name of the VAR_POSITIONAL argument if any, i.e. \*theseargs
+ kwargs : the name of the VAR_KEYWORDS argument if any, i.e. \*\*kwargs
These named attributes of the signature are used in `assemble` and `compile`
to construct a string of source code for the decorated function.