Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flake8-local-import

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flake8-local-import

Python 3 check local import for flake8

  • 1.0.6
  • PyPI
  • Socket score

Maintainers
1

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

codedescription
LI100Local import must be at the beginning of the method body
LI101Packages from external modules should not be imported locally
LI102Packages from standard modules should not be imported locally

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

https://meanmail.dev/

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc