mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
chore: replace mypy with ty in Makefile lint targets
Update lint-component target to use ty (Astral type checker) instead of mypy: - Run ty check for all components uniformly - Add fuzzer_runner to available components list - Simplify type checking logic Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Riccardo Schirone
parent
494c8ab193
commit
41508a016c
@@ -157,18 +157,16 @@ lint:
|
||||
make --no-print-directory lint-component COMPONENT=$$component; \
|
||||
done
|
||||
|
||||
# Note: common, patcher, orchestrator, program-model, seed-gen run mypy
|
||||
# Note: all components run ty type checking
|
||||
lint-component:
|
||||
@if [ -z "$(COMPONENT)" ]; then \
|
||||
echo "Error: COMPONENT not specified. Usage: make lint-component COMPONENT=<component>"; \
|
||||
echo "Available components: common, fuzzer, orchestrator, patcher, program-model, seed-gen"; \
|
||||
echo "Available components: common, fuzzer, fuzzer_runner, orchestrator, patcher, program-model, seed-gen"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo "Linting $(COMPONENT)..."
|
||||
@cd $(COMPONENT) && uv sync -q --all-extras && uv run ruff format --check && uv run ruff check
|
||||
@if [ "$(COMPONENT)" = "common" ] || [ "$(COMPONENT)" = "patcher" ] || [ "$(COMPONENT)" = "orchestrator" ] || [ "$(COMPONENT)" = "program-model" ] || [ "$(COMPONENT)" = "seed-gen" ] || [ "$(COMPONENT)" = "fuzzer" ]; then \
|
||||
cd $(COMPONENT) && uv run mypy; \
|
||||
fi
|
||||
@cd $(COMPONENT) && uv run ty check src/
|
||||
|
||||
reformat:
|
||||
@echo "Reformatting all Python code..."
|
||||
|
||||
Reference in New Issue
Block a user