diff --git a/Makefile b/Makefile index d68152d42d..c4a49e8d1d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SHELL := /bin/bash -.PHONY: init-venv clean-venv clean install install-dev reinstall reinstall-dev +.PHONY: init-venv clean-venv clean install install-dev reinstall reinstall-dev ruff check init-venv: python3 -m venv venv && source ./venv/bin/activate @@ -11,7 +11,8 @@ clean-venv: rm make_venv_to_uninstall.txt clean: - rm -rf dist/ build/ bittensor.egg-info/ .pytest_cache/ lib/ + @rm -rf dist/ build/ bittensor.egg-info/ .pytest_cache/ lib/ .mypy_cache .ruff_cache \ + $(shell find . -type d \( -name ".hypothesis" -o -name "__pycache__" \)) install: init-venv source ./venv/bin/activate && \ @@ -24,3 +25,14 @@ install-dev: init-venv reinstall: clean clean-venv install reinstall-dev: clean clean-venv install-dev + +ruff: + @python -m ruff format bittensor + +check: ruff + @mypy --ignore-missing-imports bittensor/ --python-version=3.9 + @mypy --ignore-missing-imports bittensor/ --python-version=3.10 + @mypy --ignore-missing-imports bittensor/ --python-version=3.11 + @mypy --ignore-missing-imports bittensor/ --python-version=3.12 + @mypy --ignore-missing-imports bittensor/ --python-version=3.13 + @flake8 bittensor/ --count