summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Nothman <joel.nothman@gmail.com>2020-08-18 15:17:21 +1000
committerGitHub <noreply@github.com>2020-08-18 15:17:21 +1000
commite9ed7da89a9b0790bce6be8702102eb1cd9ccbe8 (patch)
treeec6474ac9ae0111ce5911bdf254401b82ff201c4
parent676a8d4c1627e92052c2f3a5e2bde558e9a59f96 (diff)
parent2b3cd4fbc82b1ae429bd5eec601e4b89006a7b8a (diff)
downloadnumpydoc-e9ed7da89a9b0790bce6be8702102eb1cd9ccbe8.tar.gz
DOC: fix inaccuracy in validate docstring. (#294)
-rw-r--r--numpydoc/validate.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/numpydoc/validate.py b/numpydoc/validate.py
index 1fd80e1..be50885 100644
--- a/numpydoc/validate.py
+++ b/numpydoc/validate.py
@@ -425,14 +425,17 @@ def _check_desc(desc, code_no_desc, code_no_upper, code_no_period, **kwargs):
return errs
-def validate(func_name):
+def validate(obj_name):
"""
Validate the docstring.
Parameters
----------
- func_name : function
- Function whose docstring will be evaluated (e.g. pandas.read_csv).
+ obj_name : str
+ The name of the object whose docstring will be evaluated, e.g.
+ 'pandas.read_csv'. The string must include the full, unabbreviated
+ package/module names, i.e. 'pandas.read_csv', not 'pd.read_csv' or
+ 'read_csv'.
Returns
-------
@@ -465,7 +468,7 @@ def validate(func_name):
they are validated, are not documented more than in the source code of this
function.
"""
- doc = Docstring(func_name)
+ doc = Docstring(obj_name)
errs = []
if not doc.raw_doc: