Skip to main content

illegal import detector, plugin for flake8

Project description

Build Status Coverage Status

An extension for Flake8 to make sure that certain packages aren’t imported in a directory

Plugin for Flake8

When both Flake8 and flake8-illegal-import are installed, the plugin is available in flake8:

$ flake8 --version
3.6.0 (flake8-illegal-import: 0.1.0, […]


This module requires 2 parameters: –illegal-import-dir={path} –illegal-import-packages={pkg1},{pkg2}

E.g usage:

$ flake8 ./ --illegal-import-dir=./ --illegal-import-packages=os --select=II101

>>/home/…/test/ II101 importing this package is forbidden in this directory (os)

Error codes

This plugin is using the following error codes:

Presence of forbidden imports


importing this package is forbidden in this directory {pkg}


The plugin will go through all imports and find out if forbidden packages are imported in the given directory


0.1.0 - 2019-01-XX

  • Initial release

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-illegal-import-0.1.0.tar.gz (6.8 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