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 application-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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3413be9f36dda48efdfc00ada96bcaaea229c26d7bee2ced697cad48881fad07 |
|
MD5 | 604251279dbf150752bcb942063de282 |
|
BLAKE2b-256 | 139f293e158e883405f62768569f5cee77937aa0171c71fd89f9a6eb49944cb7 |
Close
Hashes for flake8_local_import-1.0.1-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae2c9ea243f46693b1316ee2370a6143c2f45d7197f4c1651b43fdd43d1320ce |
|
MD5 | d84babc35bf41027efb5097f7b9d802e |
|
BLAKE2b-256 | 0f8599ba7e1320bb6e439ae9a2d0ad7bda8a46fb672ea22a6cff08b8e3fc7205 |
Close
Hashes for flake8_local_import-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0fc4b596244812770bf12595d3eecedecce700f80297e340b7b58d2d2bbc9ff |
|
MD5 | 99f488892a888d617059332b4dfddfd6 |
|
BLAKE2b-256 | c337eb3f21eb683c2122a04b1739f527fde6bfcfc4ed2f692328b794b173d32b |