Open jankatins opened 1 year ago
If helpful in the interim, we do support some subset of this via flake8-tidy-imports
, e.g.:
[tool.ruff.flake8-tidy-imports.banned-api]
"cgi".msg = "The cgi module is deprecated, see https://peps.python.org/pep-0594/#cgi."
"typing.TypedDict".msg = "Use typing_extensions.TypedDict instead."
Looks like there is an alternative to import-linter written in Rust - https://github.com/gauge-sh/tach/
From the readme at https://github.com/seddonym/import-linter:
Some more background on this kind of linter in this blog post: https://sourcery.ai/blog/dependency-rules/