Skip to content

Add pydocstyle checks to flake8#14063

Merged
anntzer merged 1 commit into
matplotlib:masterfrom
timhoffm:flake8-docstrings
Apr 29, 2019
Merged

Add pydocstyle checks to flake8#14063
anntzer merged 1 commit into
matplotlib:masterfrom
timhoffm:flake8-docstrings

Conversation

@timhoffm

@timhoffm timhoffm commented Apr 27, 2019

Copy link
Copy Markdown
Member

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

NelleV commented Apr 27, 2019

Copy link
Copy Markdown
Member

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

@dstansby dstansby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 for me

@NelleV

NelleV commented Apr 27, 2019

Copy link
Copy Markdown
Member

@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.

5 participants