Skip to main content

no_init

  • Tool that checks that there are no __init__.py in your modules.
  • It's opinionated tool, sometimes __init__.py files are useful. But often if you use them you end up in a circular import error mess.
  • Some packages (eg mypy) works better with __init__.py, for this case you can pass --allow-empty parameter.
# install
pip install no_init

# usage (you can also use python -m no_init)
no_init my_module

# require empty __init__.py for each all submodules (recursively)
no_init --require-empty my_module

# require __version__ variable in  my_module/__init__.py (no other content is allowed)
no_init --require-version my_module

pre-commit hook

</code></pre>
<h2 id="user-content-dev-install">dev install<a href="#user-content-dev-install" aria-label="Link to heading 'dev install'" data-heading-content="dev install" class="anchor"></a></h2>
<pre><code class="language-sh">pip install -e .[dev]

Metadata

Release files for no-init 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for no-init 0.2.0
File Size Uploaded Provenance Actions
no_init-0.2.0.tar.gz 2.1 kB Without provenance Details for no_init-0.2.0.tar.gz

Release files / no_init-0.2.0.tar.gz

Download URL no_init-0.2.0.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a9d68b51c22a4adaae8aca589e12e5d5f56480bbc7b2588b896c81f87b343535
BLAKE2b-256 checksum
How to use checksums
142971daa3855854d984f299d14b8757db6020c04fb5dc6b57616c5a90be20c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Security for no-init 0.2.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page