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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa082a5a2adc30317d7d8201b336ca362b0b70fa069225e03ba75b137770cf02 |
|
MD5 | 52b2c3ffeb2fc04221f8d91947b22887 |
|
BLAKE2b-256 | c703876d9d94b93d2ae4b1ab6225ada63c50ccb723be48b79162c43da123a4a4 |
Close
Hashes for flake8_local_import-1.0.5-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8006a52e26a9e837a34e6d9f3b7e80948b4b01d19c753e68e3e5c82a429e67f |
|
MD5 | 3160dd3f6b70160ad726187c71b10aea |
|
BLAKE2b-256 | b90884db16b5f0f4f084e6abcc3503407ed79934aa976f0e2cfa42ac80a40ecc |
Close
Hashes for flake8_local_import-1.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68c81f02a4334b7828d3891191f262e55408d513982dba3ae5e6bb803ed4a47c |
|
MD5 | 402a0f77e245474b2b971bd08debe8fd |
|
BLAKE2b-256 | d0c6524f829d1c7fe33846fb3f4a4be629b37326c5f95d45c21015ffdb9d5836 |