Skip to main content

No project description provided

Project description

Helps to prevent import of certain modules from certain modules.

It's useful if you have many modules in your project and want to keep them kind of isolated.

After installing just add import-rules option to your setup.cfg file.

[flake8]
...
import-rules= 
	# yaml format here
	module_one:
		- allow module_two
		- deny any
	module_two:
		- deny module_one.sub.submodule
	module_two.sumbodule:
		- deny module_one
	module_three: allow any

	# this will prevent any import everywhere
	any:
		- deny any

	# default behaviour is
	any:
		- allow any

...

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_rules-0.1.2.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

flake8_import_rules-0.1.2-py3-none-any.whl (4.8 kB view hashes)

Uploaded 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