A Python tool to enforce dependencies, using modular architecture 🌎 Open source 🐍 Installable via pip 🔧 Able to be adopted incrementally - ⚡ Implemented with no runtime impact ♾️ Interoperable with your existing systems 🦀 Written in rust
% uv run tach check-external
❌: Undeclared dependencies in 'src/dependency_on_itself/__init__.py':
dependency_on_itself
Add the undeclared dependencies to the corresponding pyproject.toml file, or consider ignoring the dependencies by adding them to the 'external.exclude' list in tach.toml.
where:
% tree src
src
└── dependency_on_itself
├── __init__.py
└── run.py
and:
% cat src/dependency_on_itself/__init__.py
from .run import *
If * is replaced with a name e.g., main in __init__.py:
from .run import main
then tach check-external passes.
run.py:
% cat src/dependency_on_itself/run.py
def main() -> None:
print("Hello from dependency-on-itself!")
Project is created with uv init, and main() moved to run.py module.
where:
and:
If
*
is replaced with a name e.g.,main
in__init__.py
:then
tach check-external
passes.run.py
:Project is created with
uv init
, andmain()
moved torun.py
module.The expected behavior:
tach check-external
passes in both casesfrom .run import *
andfrom .run import main
.