-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
PyPI: https://pypi.org/project/flake8-typing-as-t/
This is a
flake8plugin which ensures that imports from thetypinglibrary must be written usingimport typing as t.
TYT01: Bareimport typingusageTYT02:import typing as XwhereXis not literaltTYT03:from typing import Xusage
TYT01 and TYT02 could be covered by ICN001 if the following config is added:
[tool.ruff.flake8-import-conventions.extend-aliases]
"typing" = "t"but TYT03 is still valuable to have.
Another option is to extend flake-import-conventions to flag cases like
from pandas import DataFrame # Use `import as pd` and `pd.DataFrame` insteadReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule