Skip to main content

Flake8 plugin that checks for forbidden imports in your code

Project description

Flake8 Import Linter

Flake8 plugin that checks for forbidden imports in your code

It works for both python2 and python3 since it only uses ast and configparser libraries :)

Usage

  1. flake8 config

    add "flake8_import_linter" section

    add "forbidden_modules" config

    example:

    [flake8_import_linter]

    forbidden_modules = pytest, unittest

  2. run flake8 as always

    flake8 .

  3. if a forbidden module is detected, flake8 will show:

    IMP100 forbidden import

ENJOY!

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_import_linter-0.1.10.tar.gz (2.9 kB view hashes)

Uploaded Source

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