Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9348016
D2984.id10617.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D2984.id10617.diff
View Options
diff --git a/Makefile.python b/Makefile.python
--- a/Makefile.python
+++ b/Makefile.python
@@ -8,12 +8,6 @@
TEST = python3 -m pytest
TESTFLAGS =
-CODESPELL = codespell
-CODESPELLFLAGS =
-BLACK = python3 -m black
-BLACKFLAGS =
-FLAKE = python3 -m flake8
-FLAKEFLAGS =
LINT = pylint3
LINTFLAGS = --rcfile=../pylintrc
MYPY = mypy
@@ -29,24 +23,9 @@
coverage:
$(TEST) $(TESTFLAGS) --cov=$(PYMODULE) --cov-branch $(TEST_DIRS)
-.PHONY: check check-black check-flake check-codespell check-mypy
-check: check-black check-flake check-codespell check-mypy
-check-black:
- $(BLACK) $(BLACKFLAGS) --check swh $(PYTHON_BIN)
-check-flake:
- $(FLAKE) $(FLAKEFLAGS) swh $(PYTHON_BIN)
-check-codespell:
- find swh docs -name '*.py' -o -name '*.rst' | xargs -r $(CODESPELL) $(CODESPELLFLAGS)
- find . -maxdepth 1 -iname 'readme*' | xargs -r $(CODESPELL) $(CODESPELLFLAGS)
-typecheck: check-mypy
-check-mypy:
- $(MYPY) $(MYPYFLAGS) swh
-
-.PHONY: check-staged
-check-staged:
- git diff -z --staged --name-only -- '*.py' $(PYTHON_BIN) \
- | xargs -0 -L1 -i'{}' /bin/sh -c \
- "git show ':{}' | $(FLAKE) $(FLAKEFLAGS) --stdin-display-name '{}' -"
+.PHONY: check
+check:
+ pre-commit run --all-files
.PHONY: lint
lint:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 6:08 PM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3220466
Attached To
D2984: Makefile.python: make "make check" use pre-commit
Event Timeline
Log In to Comment