question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`noqa` comments are detect as code

See original GitHub issue

This 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:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
tbrlpldcommented, Dec 9, 2019

@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.

0reactions
tbrlpldcommented, Dec 17, 2019

@sobolevn Thanks for pointing that out. That definitely helped.

I found a solution by utilizing the tokens that can be requested as input from flake8. See my pull request #106

Hope this is fine by you.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found