`noqa` comments are detect as code
See original GitHub issueThis line raises an E800 warning.
# noqa: A100
These do not:
# noqa: 100
# noqa: something
# noqa: "Something"
If anything, the second block might be code (like a line of a multi-line dictionary definition). The first block is a valid noqa-comment and should not raise that warning.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
`noqa` comments are detect as code · Issue #103 - GitHub
The # noqa: should be an inline comment anyways. When it is used that way, it is not recognized as code. I cam...
Read more >What does '# noqa' mean in Python comments? - Stack Overflow
noqa most likely stands for no quality assurance . It tells code-analysis software to ignore warnings. – Stevoisiak. Jan 30, 2018 at 17:23....
Read more >NO Quality Assurance (noqa) in Python - GeeksforGeeks
Now, go to check.py and simply create a function called printf(). You can use the below code sample. Python3. Python3 ...
Read more >Developer's notes — pycodestyle 2.10.0 documentation
The source code is currently available on GitHub under the terms and conditions of the ... (Issue #265); Fix E501 not detected in...
Read more >CLI Reference — SQLFluff 1.4.5 documentation
No color - output will be without ANSI color codes. -v, --verbose¶ ... –ignore behaves somewhat like noqa comments, except it applies globally....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sobolevn Just realized I was using it wrong anyways. The
# noqa:
should be an inline comment anyways. When it is used that way, it is not recognized as code.I cam across this because of the DAR docstring violations when I want to ignore these violations on a multi-line docstring. This seems to a flake8 related though. I am not sure how can you define to ignore a rule on a multi-line docstring.
@sobolevn Thanks for pointing that out. That definitely helped.
I found a solution by utilizing the
tokens
that can be requested as input fromflake8
. See my pull request #106Hope this is fine by you.