Skip to main content

flake8-local-import

Downloads PyPI PyPI - Python Version PyPI - Wheel PyPI - Implementation

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

https://github.com/meanmail-dev/flake8-local-import

https://meanmail.dev/

Metadata

Release files for flake8-local-import 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-local-import 1.0.6
File Size Uploaded
flake8_local_import-1.0.6.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-local-import 1.0.6
File Interpreter ABI Platform
flake8_local_import-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / flake8_local_import-1.0.6.tar.gz

Download URL flake8_local_import-1.0.6.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9872956bacae2f9713e9927f7da8f39d41becb2adb0aa166310abc6ec039c591
BLAKE2b-256 checksum
How to use checksums
707bead94444b7ca2dcea394e2cd4573f660ef29147c225b795d21661fe94f7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

Release files / flake8_local_import-1.0.6-py3-none-any.whl

Download URL flake8_local_import-1.0.6-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a326319ee37ae7cd3dd67e5b5afe7f59515fcce348d622c82b53422553937992
BLAKE2b-256 checksum
How to use checksums
ae21dab4ef91d6dd3f506ffe4e73b5bab1893bbf0234b9bec7b34eb0dce5339f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page