Rule request
Thesis
I propose to relax WPS412 to allow __init__.py files to perform re-exports when they only contain import statements and no internal logic.
Example:
from some_project.apps.some_app.infrastructure.repository.example import ExampleRepo as ExampleRepo
Reasoning
- It is common Python practice to use
__init__.py to expose a package’s public API.
- These files do not contain business logic, only
import statements for convenience.
- The current rule forces
per-file-ignores even when no real logic exists.
- Such re-exports are idiomatic in larger codebases (e.g., DDD-style architectures).
Rule request
Thesis
I propose to relax WPS412 to allow
__init__.pyfiles to perform re-exports when they only contain import statements and no internal logic.Example:
from some_project.apps.some_app.infrastructure.repository.example import ExampleRepo as ExampleRepoReasoning
__init__.pyto expose a package’s public API.importstatements for convenience.per-file-ignoreseven when no real logic exists.