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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77e089de0994e7f77852122719a952041a75f957767263ca11c099147195794f |
|
MD5 | e58251ea298f29fe7ae29bfe75fc6ddb |
|
BLAKE2b-256 | 98156c42d88bc7f91a890a605c5732609ff8a2ffeae3288cfe13b575836e9b01 |
Close
Hashes for flake8_local_import-1.0.3-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd7ca6d78b611567f8f57fe30d2b7a03bce69702899120fe2a61cb4835e7e224 |
|
MD5 | 317b31e45c15c0b486d4742391fe136e |
|
BLAKE2b-256 | 3f2dae344495a55481e324e9221cb02de39a7032dfa92ef0b7603f0dde561d48 |
Close
Hashes for flake8_local_import-1.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43ab2e61a6dddd2456ac99c6fb44eed3e61888742d31151cdaa95ef9633ccaba |
|
MD5 | 6c553920b13029b6e40e21748228e1b3 |
|
BLAKE2b-256 | 754d4fd266ae5a72102186302ab6cc841ad39f24a5967e08399c70e03a8f165f |