ruff icon indicating copy to clipboard operation
ruff copied to clipboard

`noqa: E402` not detected

Open spaceone opened this issue 2 years ago • 2 comments

print(1)
from very_long_module\
    import nothing  # noqa: E402,F401

doesn't detect E402

spaceone avatar Jan 26 '23 16:01 spaceone

similar (but I think another issue exists for it already): F811 is not ignored.

def overload(f): pass
from typing import (  # noqa: F401,F811
    overload,
)

spaceone avatar Jan 26 '23 16:01 spaceone

See also #2253

spaceone avatar Jan 27 '23 14:01 spaceone

Similar issue:

This noqa is valid in flake8 but not detected by ruff:

        is_to_run = (
            lambda x: 1  # type: ignore[assignment,misc] # pylint: disable=unnecessary-lambda-assignment
        )  # noqa: E731 We're going to throw all this anyway

(While this one work for both:)

        is_to_run = (  # noqa: E731, We're going to throw all this anyway
            lambda x: 1  # type: ignore[assignment,misc] # pylint: disable=unnecessary-lambda-assignment
        )

Pierre-Sassoulas avatar Feb 06 '23 12:02 Pierre-Sassoulas