Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

False positive for D416 on function with Numpy convention in 4.0.0 version #376

Closed
roubaeli opened this issue Jul 9, 2019 · 3 comments
Closed

Comments

@roubaeli
Copy link

roubaeli commented Jul 9, 2019

Previously worked correctly, in new 4.0.0 version functions with Numpy style docstring fail with:
D416: Section name should end with a semicolon ('Parameters:', not 'Parameters')
on a docstring like:

"""
Function description.

Parameters
----------
first_parameter
    Description of the parameter.
"""
@mrshannon
Copy link
Contributor

mrshannon commented Jul 17, 2019

Version 4.0.0 added support for Google convention and thus new violations that must be ignored based on the convention. Setting the convention to numpy in setup.cfg or on the command line results in the correct behavior.

I am guessing that the false positive above is in a project that is using --ignore or --select. The new Google specific codes (D415, D416, D417) will either need to be added or the numpy convention set and --add-ignore or --add-select be used for any additional project specific overrides.

Since this issue is about configuration file changes across a major version change it should probably be closed.

@roubaeli
Copy link
Author

Thanks for the advice - it did fix the issue. I would suggest that although it's not a bug it is maybe a problem with the documentation?

In the latest documentation version, there is no mention of google being a possible convention setting:
--convention=<name> choose the basic list of checked errors by specifying an existing convention. Possible conventions: pep257, numpy.

And this point in release notes:
Added initial support for Google convention (#357).
does in no way suggest to me that this version breaks backward compatibility and requires changes in tests settings.

@mrshannon
Copy link
Contributor

Documentation fixed by #386.

At the top of the Release Notes it is mentioned that pydocstyle uses Semantic Versioning which means that a major release 3.0.0 -> 4.0.0 indicates a breakage in backwards compatibility.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants