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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pydocstyle checks to flake8 #14063

Merged
merged 1 commit into from
Apr 29, 2019
Merged

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Apr 27, 2019

PR Summary

This enables docstring checks using pydocstyle. I've integrated the checks into flake8 via the flake8-docstrings plugin. This has two advantages over running pydocstyle standalone:

  1. We have already set up flake8 on CI, so there is no extra CI configuration necessary.
  2. The file detection mechanism of flake8 is used, allowing for per-file-ignores, which pydocstyle does not support itself.

To keep it simple in the beginning, this PR ignores most pydocstyle error codes. Only D201 and D206 are currently checked. We can subsequently enable more checks as we go along.

  • Note: To see if the detection works, I've intentionally left one D201 error in the code. Will be fixed, once I've verified that it is found in CI.
    Done The error was found in CI, and I've pushed the fix. - It works 馃帀

@NelleV
Copy link
Member

NelleV commented Apr 27, 2019

I'm happy with this, but I figure this should be discuss by more than one person.
馃憤 for me.

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃憤 for me

@NelleV
Copy link
Member

NelleV commented Apr 27, 2019

@ivanov Care to comment on that? 馃槃

@tacaswell tacaswell added this to the v3.2.0 milestone Apr 29, 2019
@anntzer anntzer merged commit 1891ba1 into matplotlib:master Apr 29, 2019
@timhoffm timhoffm mentioned this pull request Jul 8, 2019
@timhoffm timhoffm deleted the flake8-docstrings branch June 10, 2022 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants