A noqa for specific warnings/errors per block/line
See original GitHub issueIt would be nice if we could ignore warnings and errors on a per block or per line basis much like # noqa
at the end of a line for example.
Use case:
- Ignore a block of code (a function) that’s considered by
mccabe
to be “too complex” but you don’t have the time to fix it right now.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:8
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Flake8: Ignore specific warning for entire file - Stack Overflow
This will ignore these errors across all files. My question was how to ignore particular errors in a single file. – Mark Amery....
Read more >Ignoring Errors with Flake8 — flake8 3.1.1 documentation
By default, Flake8 has a list of error codes that it ignores. The list used by a version of Flake8 may be different...
Read more >pylama - Bountysource
It would be nice if we could ignore warnings and errors on a per block or per line basis much like # noqa...
Read more >Source code for picos.expressions.algebra - GitLab
[docs]@functools.lru_cache() def O(rows=1, cols=1): # noqa """Create a zero matrix. ... from error # Sum all coefficient matrices.
Read more >Thread: [Docutils-checkins] SF.net SVN - SourceForge
+ Preferably use the `debug`, `info`, `warning`, `error`, or `severe` + ... TODO: why is abs_line_number() == srcline+1 + # if the error...
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
How can I make flake8 ignore a block of code rather than just by line?
I would suggest the following notation as supported by flake8.
Flake supports to list specific errors only, by using
# noqa:<Error No>
See here: https://pypi.python.org/pypi/flake8