Only honor noqa in comments

This commit is contained in:
codingFeng101 2026-07-02 16:12:25 +08:00
parent bb943328ef
commit 6e5c5cdc27
3 changed files with 36 additions and 1 deletions

View file

@ -28,6 +28,7 @@ from flake8.violation import Violation
("E111", "a = 1 # noqa - We do not care", True),
("E111", "a = 1 # noqa: We do not care", True),
("E111", "a = 1 # noqa:We do not care", True),
("E111", "a = '# noqa'", False),
("ABC123", "a = 1 # noqa: ABC123", True),
("E111", "a = 1 # noqa: ABC123", False),
("ABC123", "a = 1 # noqa: ABC124", False),