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

Multi-line entries in configuration file #250

Closed
peterjc opened this Issue Apr 25, 2017 · 2 comments

Comments

Projects
2 participants
@peterjc
Copy link

peterjc commented Apr 25, 2017

Related tool flake8 explicitly supports multi-line configuration entries (which can be intermixed with comments) as described in http://flake8.pycqa.org/en/latest/user/configuration.html

e.g.

[flake8]
# it's not a bug that we aren't using all of hacking
ignore =
    # F812: list comprehension redefines ...
    F812,
    # H101: Use TODO(NAME)
    H101,
    # H202: assertRaises Exception too broad
    H202,
    # H233: Python 3.x incompatible use of print operator
    H233,
    # H301: one import per line
    H301,
    # H306: imports not in alphabetical order (time, os)
    H306,
    # H401: docstring should not start with a space
    H401,
    # H403: multi line docstrings should end on a new line
    H403,
    # H404: multi line docstring should start without a leading new line
    H404,
    # H405: multi line docstring summary not separated with an empty line
    H405,
    # H501: Do not use self.__dict__ for string formatting
    H501

I would like to be able to do the same in .pydocstyle for our ignore = list in order to comment why we ignore some entries, and facilitate merging edits to the file.

In my testing with pydocstyle v2.0.0 an example like this fails (it seems to use an empty ignore list).

@peterjc

This comment has been minimized.

Copy link

peterjc commented May 4, 2017

For anyone else with a similar use case, I decided to stop running pydocstyle directly, and instead use it via flake8 with the flake8-docstring plugin. This means I can put the D### codes into a .flake8 configuration file.

@Nurdok Nurdok added this to Planned in Pydocstyle 2.1.1 May 5, 2017

@shacharoo shacharoo moved this from Planned to In Progress / Assigned in Pydocstyle 2.1.1 Sep 8, 2017

@shacharoo shacharoo self-assigned this Sep 8, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 8, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 8, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 11, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 11, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 17, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 17, 2017

shacharoo added a commit to shacharoo/pydocstyle that referenced this issue Sep 18, 2017

Nurdok added a commit that referenced this issue Sep 18, 2017

Merge pull request #281 from FarmerSez/Feature/support-multi-lined-co…
…nfigs

#250 - Added support for multi-lined config entries
@shacharoo

This comment has been minimized.

Copy link
Member

shacharoo commented Sep 18, 2017

Done in #281 🖖

@shacharoo shacharoo closed this Sep 18, 2017

@shacharoo shacharoo moved this from In Progress / Assigned to Done in Pydocstyle 2.1.1 Sep 18, 2017

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