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 Distributions
Close
Hashes for flake8_local_import-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 559887b9f9b9961e0dc1db28c7600b156d2238bc9a5f2df882cfae23decc5c24 |
|
MD5 | c419d36271855474eac0da3fbd0121d5 |
|
BLAKE2b-256 | b91b261c38e7f9d7d2cb56110c15c8ae6df9cb7a89bd28519b4c87338af86c06 |
Close
Hashes for flake8_local_import-1.0.2-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | f07131cfee3d3ed72e0d3e86801470504d07220957846d8e8e64738ac7e74308 |
|
MD5 | 515873e3fc94821b0ea90344488b9f64 |
|
BLAKE2b-256 | 5945d91ccabbe3a34e989cc007f8216f6731908c2c8c3c8d257e855f83234bc3 |
Close
Hashes for flake8_local_import-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f95a6e957955802a5b8618a5e06af9795dce15e6bad8c4d22e0b8dbad8e73ac9 |
|
MD5 | 1002a6363e11589df39e32432933c732 |
|
BLAKE2b-256 | ad59289d01aad1c277fe5b610ab6745bd83a87d5d497a9823ac51c387c8d944d |