We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F401 is a rule that removes unused imports.
The issue is that F401 removes imports that are necessary for typing annotations expressed as comments, see below.
from typing import Any # <-- this import is removed by ruff x = 1 # type: Any
The import is eliminated erroneously:
x = 1 # type: Any
The code is unchanged.
The text was updated successfully, but these errors were encountered:
I believe this is a duplicate of #1619 (Ruff doesn't parse comment annotations right now).
Sorry, something went wrong.
No branches or pull requests
F401 is a rule that removes unused imports.
The issue is that F401 removes imports that are necessary for typing annotations expressed as comments, see below.
Repro Case
Current Behavior
The import is eliminated erroneously:
Desired Behavior
The code is unchanged.
The text was updated successfully, but these errors were encountered: