mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
[flake8-tidy-imports
] add documentation for banned-api
(#2819)
This commit is contained in:
parent
fc465cc2af
commit
02897a141b
3 changed files with 39 additions and 1 deletions
21
docs/rules/banned-api.md
Normal file
21
docs/rules/banned-api.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# banned-api (TID251)
|
||||
|
||||
Derived from the **flake8-tidy-imports** linter.
|
||||
|
||||
## What it does
|
||||
Checks for banned imports.
|
||||
|
||||
## Why is this bad?
|
||||
Projects may want to ensure that specific modules or module members are
|
||||
not be imported or accessed.
|
||||
|
||||
Security or other company policies may be a reason to impose
|
||||
restrictions on importing external Python libraries. In some cases,
|
||||
projects may adopt conventions around the use of certain modules or
|
||||
module members that are not enforceable by the language itself.
|
||||
|
||||
This rule enforces certain import conventions project-wide in an
|
||||
automatic way.
|
||||
|
||||
## Options
|
||||
* `flake8-tidy-imports.banned-api`
|
Loading…
Add table
Add a link
Reference in a new issue