[flake8-tidy-imports] add documentation for banned-api (#2819)

This commit is contained in:
Simon Brugman 2023-02-12 19:09:39 +01:00 committed by GitHub
parent fc465cc2af
commit 02897a141b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 1 deletions

21
docs/rules/banned-api.md Normal file
View 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`