Closed erikvanderwerf closed 2 years ago
Can you try this with the previous version? (v1.2.2) I just made a change to how the noqa comments are tracked (to fix an opposite problem), and I think this is why I had done it the other way to begin with. I might have to re-think that change...
Wow! I would not have guessed that this was so recent. I noticed that 1.2.3 was released only a few hours before I tried it for the first time!
(venv) $ pip install -q -U flake8-noqa==1.2.3 && pip list | grep noqa && flake8 --docstring-style=sphinx --max-line-length=100 example.py
flake8-noqa 1.2.3
example.py:13:10: NQA102 "# noqa: D401, DAR401 " has no matching violations
(venv) $ pip install -q -U flake8-noqa==1.2.2 && pip list | grep noqa && flake8 --docstring-style=sphinx --max-line-length=100 example.py
flake8-noqa 1.2.2
Hello!
I have run into a tricky problem, where flake checks relating to docstrings and docstring formatting are raised inside multiline comments.
My environment approximates the packages below. I am using other libraries to make my problem easier to spot, but it does not strictly depend on them.
example.py
As written, I get the output:
With the
noqa
in place, Flake8 is able to suppressD401
andDAR401
(coincidental codes) that relate to exceptions and docstring formatting. The lint errors are "produced" on line 7, you can see this if you remove thenoqa
. Flake must be performing some logic to detect thenoqa
at the end of a multiline comment, since it would be bad-form to put thenoqa
literally inside the docstring.Would you be able to perform the same check so that I can keep my
noqa
after the docstring?