Skip to content

Adopt flake8-docstrings to run pydocstyle via flake8 #1199

Closed

Description

@peterjc

Once it has been updated for pydocstyle v2.0.0, I propose we use flake8-docstrings to run the docstring (PEP257) checks via flake8 instead of calling pydocstyle.

Cross reference https://gitlab.com/pycqa/flake8-docstrings/issues/19

i.e. For both the TravisCI/Tox configuration and the proposed git pre-commit hook.

The advantage of this is we can get ride of our .pydocstyle configuration file and move those settings into .flake8 and then just need to run a single tool for the style checks.

Cross reference #1170 and #493 and #883

Activity

  1. MarkusPiotrowski commented on Apr 28, 2017

    @MarkusPiotrowski
    Contributor

    I adopted the fix mentioned in https://gitlab.com/nightmarebadger/flake8-docstrings/commit/8ffc68a821fd3b89641c10c3086d6672e04f5bf4 manually. These are just a few lines and it worked fine. Used flake8-docstrings for the recent work on Restriction.py as pre-commit hook locally.

  2. peterjc commented on Apr 28, 2017

    @peterjc
    MemberAuthor

    That's good news. If we can get all the python code checks via flake8, then a standard flake8 pre-commit git hook ought to be enough for Biopython.

    Right now on #1188 I have an overly complicated script which does flake8 and pydocstyle on changed Python files, plus rst-lint on changed RST files.

  3. peterjc commented on May 1, 2017

    @peterjc
    MemberAuthor

    flake8-docstrings v1.0.1 has been released now, testing now...

  4. peterjc commented on May 1, 2017

    @peterjc
    MemberAuthor

    Note right now the flake8 provided git pre-commit hook is unusable as it doesn't restrict itself to just Python files: https://gitlab.com/pycqa/flake8/issues/325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions