Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider directives when validating docstrings parameters #22405

Closed
datapythonista opened this issue Aug 17, 2018 · 1 comment · Fixed by #22423
Closed

Consider directives when validating docstrings parameters #22405

datapythonista opened this issue Aug 17, 2018 · 1 comment · Fixed by #22423

Comments

@datapythonista
Copy link
Member

datapythonista commented Aug 17, 2018

When running the docstring validation script, errors are mistakenly reported if parameters have a deprecated, versionadded or versionchanged directive.

For example, when running ./scripts/validate_docstrings.py pandas.DataFrame.mode, the next error is returned by the script:

################################################################################
################################## Validation ##################################
################################################################################

Errors found:
	Errors in parameters section
		Parameter "dropna" description should finish with "."

But the dropna parameter description does finish with a period:

dropna : bool, default True
    Don't consider counts of NaN/NaT.

    .. versionadded:: 0.24.0

The problem is that the .. versionadded:: directive is not considered.

The script should ignore the directive when validating, and shouldn't report the error in this case.

@bengineer19
Copy link
Contributor

Now adding deprecated and versionchanged directives as well.

@datapythonista datapythonista changed the title Consider versionadded when validating docstrings parameters Consider directives when validating docstrings parameters Aug 20, 2018
@jreback jreback added this to the 0.24.0 milestone Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants