Skip to content

flake8 should only consider a noqa comment if it is actually a comment #1321

Description

@asottile

minimal reproduction:

def f():
    x = '# noqa'

I expect this to report the same as if that were an unrelated string:

def f():
    x = '......'
$ flake8 unrelated.py
unrelated.py:2:5: F841 local variable 'x' is assigned to but never used

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions