ruff
fe9f065a - [flake8-tidy-imports] Add `extend-banned-api` (#28644)

Commit
6 days ago
[flake8-tidy-imports] Add `extend-banned-api` (#28644) ## Summary Add `lint.flake8-tidy-imports.extend-banned-api` so we can add banned APIs without repeating an inherited `banned-api` table. Entries in `extend-banned-api` override entries with the same key in `banned-api`, including their diagnostic messages. For example, a child `ruff.toml` can add a ban while retaining the bans from its base configuration: ```toml extend = "../ruff.toml" [lint.flake8-tidy-imports.extend-banned-api] "typing.TypedDict".msg = "Use typing_extensions.TypedDict instead." ``` This follows the existing `extend-aliases` behavior: the base and extension tables inherit independently, and we merge them after resolving configuration inheritance. A child can replace either table, or clear it with `{}`. The change includes option documentation, the generated JSON schema, and CLI coverage for standalone bans, inheritance, message overrides, and clearing either table.
Author
Parents
Loading