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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f00daaf4fd3ae30d28cf3ec50d9db5b3813ca02b4cfd24b4cd83a63c79aed35f |
|
MD5 | 8533f6d997c281cf3c1a11168de496d5 |
|
BLAKE2b-256 | 636d7647e686759f51144f4085ad0fe0f3ae1343cd3e43a3d1818fa4da86d4ac |
Close
Hashes for flake8_local_import-1.0.4-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4985d218b8a00a0b940af9c9c2290f2dfe931a71e532519b49d96a0d25ce2a1 |
|
MD5 | ef087d748bab9d0e3b190bdbd6027dcd |
|
BLAKE2b-256 | 6e1957ada9fea11438ee4a1a549edbeb34c384f4b9851debd07a1dd33f652988 |
Close
Hashes for flake8_local_import-1.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 046ff5b9b11972f6e66c4c663c9ab27a51fa9e7a646337fa53adc9e767acbade |
|
MD5 | 6e2dc55221246ced0a885b8422b7694c |
|
BLAKE2b-256 | 6bf2a1af585d3b2ab2197a8ecbd3aa250d2bf63146d2c3910a3350da285a5ad5 |