Skip to content

Commit 0a52706

Browse files
committed
Minor enhancements to Makefile
1 parent e549d36 commit 0a52706

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

Makefile

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ SRC_DIRS := project_name/ test/ # FIXME
55
.PHONY: help
66
help:
77
@echo "Available targets:"
8+
@echo " help : Show this help message"
89
@echo " format : Format code using Ruff format"
910
@echo " check_format : Check code formatting with Ruff format"
11+
@echo " ruff : Run Ruff linter"
12+
@echo " mypy : Run MyPy static type checker"
1013
@echo " lint : Run Ruff linter and Mypy for static code analysis"
1114
@echo " test : Run tests using pytest"
1215
@echo " clean : Clean up caches and build artifacts"
13-
@echo " run_local_checks : Run format, lint, and test"
14-
@echo " help : Show this help message"
16+
@echo " checks : Run format, lint, and test"
1517

1618
.PHONY: format
1719
format:
@@ -28,13 +30,18 @@ check_format:
2830
@echo "=====> Checking imports are sorted..."
2931
@poetry run ruff check --select I --exit-non-zero-on-fix $(SRC_DIRS)
3032

33+
.PHONY: ruff
34+
ruff:
35+
@echo "=====> Running Ruff..."
36+
@poetry run ruff check $(SRC_PATHS)
3137

32-
.PHONY: lint
33-
lint:
34-
@echo "=====> Running Ruff linter..."
35-
@poetry run ruff check $(SRC_DIRS)
38+
.PHONY: mypy
39+
mypy:
3640
@echo "=====> Running Mypy..."
37-
@poetry run mypy $(SRC_DIRS)
41+
@poetry run mypy $(SRC_PATHS)
42+
43+
.PHONY: lint
44+
lint: ruff mypy
3845

3946
.PHONY: test
4047
test:
@@ -47,4 +54,4 @@ clean:
4754
@poetry run ruff clean
4855
@rm -rf .cache .pytest_cache .mypy_cache build dist *.egg-info
4956

50-
run_local_checks: format lint test
57+
checks: format lint test

0 commit comments

Comments
 (0)