flake8-empty-init-modules
flake8 plugin that disallows code in __init__.py modules.
installation
python -m pip install flake8-empty-init-modules
checks
EIM001
Disallows all code in any __init__.py module.
EIM002
Allows imports and assignment to __all__ in __init__.py modules, but nothing
else.
This check is disabled by default. To use this check instead of EIM001 add the
following to your setup.cfg
[flake8]
ignore = EIM001
enable-extensions=EIM002
rationale
Code in __init__.py modules is often unwanted because:
- it runs at import-time - this can cause surprising import-time side-effects
- these modules are often empty, so code there is easily missed
The relaxed version of this check allows convenience imports in __init__.py
modules without allowing 'real' code to hide out there.
Metadata
Release files for flake8-empty-init-modules 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| flake8_empty_init_modules-1.0.1.tar.gz | 3.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_empty_init_modules-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 7.2 kB
Release files / flake8_empty_init_modules-1.0.1.tar.gz
| Download URL | flake8_empty_init_modules-1.0.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ede08296359844c09b200acb3f71844e901bfcf57d30f5e128bcaf5182fbf2cc
|
|
BLAKE2b-256 checksum How to use checksums |
82d2ab6dd8b4b51f910b17e3b1f1bdd5af2e63e62939415ad3f41c670290812a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Release files / flake8_empty_init_modules-1.0.1-py2.py3-none-any.whl
| Download URL | flake8_empty_init_modules-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4e9a2438e5a0d94e3e4d42ffec9e91d3afcfa66a47a921f1651d219293822d8c
|
|
BLAKE2b-256 checksum How to use checksums |
3c4ace7de89627047161e7b61555c4c536e12d69ec528a2a14933a8eee7504b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Security for flake8-empty-init-modules 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.