Python 3 check local import for flake8
Project description
flake8-local-import
Python 3 check local import for flake8
Installation
pip install flake8-local-import
Configuration
You will want to set the app-import-names
option to a comma separated
list of names that should be considered local to your application. Note that
relative imports are always considered local.
Example
# Error
def func():
statement
from app_package import A # LI100 Local import must be at the beginning of the method body
# Error
def func():
statement
from app_package import A # LI100 Local import must be at the beginning of the method body
# Good
def func():
from app_package import A
statement
Error codes
code | description |
---|---|
LI100 | Local import must be at the beginning of the method body |
LI101 | Packages from external modules should not be imported locally |
LI102 | Packages from standard modules should not be imported locally |
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flake8_local_import-1.0.6.tar.gz
.
File metadata
- Download URL: flake8_local_import-1.0.6.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9872956bacae2f9713e9927f7da8f39d41becb2adb0aa166310abc6ec039c591 |
|
MD5 | 132e3049af2b2de3e745a0945ed7b31c |
|
BLAKE2b-256 | 707bead94444b7ca2dcea394e2cd4573f660ef29147c225b795d21661fe94f7a |
File details
Details for the file flake8_local_import-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: flake8_local_import-1.0.6-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a326319ee37ae7cd3dd67e5b5afe7f59515fcce348d622c82b53422553937992 |
|
MD5 | ff52cbf192b3d4f8d4b1e651ba40d2a3 |
|
BLAKE2b-256 | ae21dab4ef91d6dd3f506ffe4e73b5bab1893bbf0234b9bec7b34eb0dce5339f |