Skip to main content

A flake8 lint to enforce that some modules can't be imported from other modules.

Project description

Flake8 Import Graph

A flake8 lint to enforce that some modules can’t be imported from other modules.

pip install flake8-import-graph==0.1.3

Configure it, by putting .flake8 file in the package root:

[flake8]
deny-imports =
    # Don't allow models importing controllers
    myapp.models=myapp.controllers
    # Don't allow controllers to import sqlalchemy directly
    myapp.controllers=sqlalchemy

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

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-graph-0.1.3.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file flake8-import-graph-0.1.3.tar.gz.

File metadata

  • Download URL: flake8-import-graph-0.1.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for flake8-import-graph-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d06a509685d90ec655b441c99aa9a8b4d5d6a699613d83f928147b99b4320370
MD5 20c3813ded23392034f8b3510f8a1964
BLAKE2b-256 5653c30aea9272dfadb187b2921dc458c6eb19be72c7cd4f8d78acfd1fbe34d9

See more details on using hashes here.

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