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
Close
Hashes for flake8_local_import-1.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9872956bacae2f9713e9927f7da8f39d41becb2adb0aa166310abc6ec039c591 |
|
MD5 | 132e3049af2b2de3e745a0945ed7b31c |
|
BLAKE2b-256 | 707bead94444b7ca2dcea394e2cd4573f660ef29147c225b795d21661fe94f7a |
Close
Hashes for flake8_local_import-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a326319ee37ae7cd3dd67e5b5afe7f59515fcce348d622c82b53422553937992 |
|
MD5 | ff52cbf192b3d4f8d4b1e651ba40d2a3 |
|
BLAKE2b-256 | ae21dab4ef91d6dd3f506ffe4e73b5bab1893bbf0234b9bec7b34eb0dce5339f |