pydocstyle icon indicating copy to clipboard operation
pydocstyle copied to clipboard

[Feature Request] Add --disable-noqa option

Open plinss opened this issue 5 years ago • 5 comments

This option would enable the disable_skip_errors flag in ConventionChecker.check() added in #485.

I don't have a need for this feature, but I mention it because pydocstyle doesn't have feature parity with flake8's --disable-noqa feature. This issue exists primarily for tracking purposes, feel free to close as "won't fix".

plinss avatar Jun 09 '20 16:06 plinss

As I said in #485, I really find it unrealistic to expect every tool to implement every flag that Flake8 has even if they strive to support a sub-set of Flake8's features (e..g, #noqa) I'm not a maintainer here though, so I express this opinion to further support the maintainers if they choose to close this without implementing this

sigmavirus24 avatar Jun 09 '20 17:06 sigmavirus24

I'm actually interested in using this in flake8-docstrings if it were implemented here

pydocstyle currently has an incompatible view of noqa compared to flake8

# noqa: D123  # pydocstyle considers this as applying to the docstring line afterward
"""foo
bar
"""  # noqa: D123  # this is where flake8 expects the noqa comment

asottile avatar Nov 13 '20 18:11 asottile

@asottile I added the API support for this in https://github.com/PyCQA/pydocstyle/pull/485/files

My intention is to submit a PR for flake8-docstrings to add the ignore_inline_noqa flag when calling pydocstyle. Feel free to beat me to it.

One question I have, would you rather require a version of pydocstyle that has the additional API, or use a try/except block to call it with or without the flag?

plinss avatar Nov 13 '20 18:11 plinss

try except probably -- flake8-docstrings currently supports a lot of versions of pydocstyle

asottile avatar Nov 13 '20 18:11 asottile

Ok, will submit a PR today

plinss avatar Nov 13 '20 18:11 plinss