Summary
The repository has recurring one-off dead-code cleanup issues, but no automated guard that prevents unused Python helpers, stale test fixtures, and framework leftovers from accumulating again.
Add vulture as a developer/CI pre-push check and clean up the dead code it currently reports.
Evidence
While analyzing the vulture-integration compare branch, the branch removed confirmed unused code such as:
- Dead helper methods and fields in
gittensor/classes.py.
- Unused timestamp/repository helpers.
- Stale validator test fixtures that no tests reference.
- Unused test sentinel variables and callback argument names.
The branch also demonstrated that vulture can run cleanly when configured with repo-specific excludes for schema-like or framework-driven surfaces.
Expected behavior
uv run vulture should pass locally after uv sync --extra dev.
- Pre-push validation should include vulture alongside pyright.
- CI pre-push checks should run vulture so future dead code is caught before merge.
- Known false positives should be handled in
pyproject.toml via tool.vulture configuration, not by noisy inline suppressions.
Acceptance criteria
- Add
vulture to dev dependencies.
- Add a pre-push
vulture hook to .pre-commit-config.yaml.
- Add
[tool.vulture] config with project paths, excludes, and ignored framework names.
- Remove currently reported dead code when safe.
- Keep runtime behavior unchanged.
- Validate with:
uv sync --extra dev
uv run vulture
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pytest -q
SKIP=pytest uv run pre-commit run --all-files --hook-stage pre-push
Summary
The repository has recurring one-off dead-code cleanup issues, but no automated guard that prevents unused Python helpers, stale test fixtures, and framework leftovers from accumulating again.
Add
vultureas a developer/CI pre-push check and clean up the dead code it currently reports.Evidence
While analyzing the
vulture-integrationcompare branch, the branch removed confirmed unused code such as:gittensor/classes.py.The branch also demonstrated that
vulturecan run cleanly when configured with repo-specific excludes for schema-like or framework-driven surfaces.Expected behavior
uv run vultureshould pass locally afteruv sync --extra dev.pyproject.tomlviatool.vultureconfiguration, not by noisy inline suppressions.Acceptance criteria
vultureto dev dependencies.vulturehook to.pre-commit-config.yaml.[tool.vulture]config with project paths, excludes, and ignored framework names.