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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gets confused with pydocstyle (Dxxx) violations #1

Closed
plinss opened this issue Jun 8, 2020 · 5 comments
Closed

Gets confused with pydocstyle (Dxxx) violations #1

plinss opened this issue Jun 8, 2020 · 5 comments
Assignees

Comments

@plinss
Copy link
Owner

plinss commented Jun 8, 2020

If a line has a Dxxx violation and you add a # noqa: Dxxx flake-noqa starts complaining that Dxxx isn't matched on that line.

This is due to the fact that pydocstyle parses the # noqa comment itself and never sends the violation report to flake8, so flake8-noqa stops seeing it.

Issue filed on pydocstyle to add a --disable-noqa equivalent, and will be followed by an issue on flake8-docstyle to invoke the option. Note the same issue also affects flake8 --disable-noqa, it still won't show violations reported by pydocstyle and blocked by # noqa comments regardless if this plugin is used or not.

Should the issues on pydocstyle and flake8-docstyle be rejected, will look for some kind of less-than-ideal workaround.

@jonyscathe
Copy link

Looks to be a similar issue with flake8-print violations, at least with T001.

With print('test') # noqa: T001 we get 'NQA102 (flake8-noqa) "# noqa: T001" has no matching violations'
With just print('test') we get T001 print found.

With print('test') # noqa it works ok, but that is a pretty average solution.

@scop
Copy link

scop commented Mar 1, 2021

Looks like the pydocstyle issue was taken care of, I wonder what the status for the rest of TODOs to get flake8-docstrings to cooperate is?

@plinss
Copy link
Owner Author

plinss commented Mar 2, 2021

Just waiting for this to get merged: https://gitlab.com/pycqa/flake8-docstrings/-/merge_requests/29

@plinss
Copy link
Owner Author

plinss commented Mar 22, 2021

Fixed in flake8-docstrings v1.6.0

@provinzkraut
Copy link

Are there any recommendations on how to handle this when not using a flake8 integration for pydocstyle?
Unfortunately flake8-docstyle isn't suitable for use due to its limited configuration options, so we have to use pydocstyle directly.

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

No branches or pull requests

4 participants