mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 05:20:49 -05:00
## Summary Add a new rule `TID253` (`banned-module-level-imports`), to ban a user-specified list of imports from appearing at module level. This rule doesn't exist in `flake8-tidy-imports`, so it's unique to Ruff. The implementation is pretty similar to `TID251`. Briefly discussed [here](https://github.com/astral-sh/ruff/discussions/6370). ## Test Plan Added a new test case, checking that inline imports are allowed and that non-inline imports from the banned list are disallowed.
76 KiB
Generated
76 KiB
Generated