Skip to main content

Python 3 check local import for flake8

Project description

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

No configuration required

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/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8_local_import-1.0.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distributions

flake8_local_import-1.0.0-py3.8.egg (3.7 kB view hashes)

Uploaded Source

flake8_local_import-1.0.0-py2.py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page