aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile28
-rw-r--r--README.md7
2 files changed, 29 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 00868a1..80480ee 100644
--- a/Makefile
+++ b/Makefile
@@ -83,6 +83,20 @@ test: src/hydrilla/_version.py catalogs
run-haketilo: src/hydrilla/_version.py catalogs
PYTHONPATH=./src $(GUIX_DEVSHELL) python3 -m hydrilla.mitmproxy_launcher
+mypy-lint: src/hydrilla/_version.py
+ PYTHONPATH=./src/ $(GUIX_DEVSHELL) mypy -p hydrilla
+
+mypy-lint-server: src/hydrilla/_version.py
+ $(GUIX_DEVSHELL) mypy src/hydrilla/server/__main__.py
+
+mypy-lint-builder: src/hydrilla/_version.py
+ $(GUIX_DEVSHELL) mypy src/hydrilla/builder/__main__.py
+
+mypy-lint-haketilo: src/hydrilla/_version.py
+ $(GUIX_DEVSHELL) mypy \
+ src/hydrilla/proxy/addon.py \
+ src/hydrilla/mitmproxy_launcher/__main__.py
+
clean-bin-tarball-repack:
test -d bin-tarball-repack/ && chmod -R +w bin-tarball-repack/ || true
rm -rf bin-tarball-repack/
@@ -91,12 +105,14 @@ clean-source-tarball-repack:
rm -rf source-tarball-repack/
clean: clean-bin-tarball-repack clean-source-tarball-repack
- rm -rf build/ dist/ src/hydrilla.egg-info src/hydrilla/_version.py \
- src/hydrilla/locales/messages.pot make-release.log \
- haketilo-and-hydrilla-bin-*.tar.gz
+ rm -rf build/ dist/ src/hydrilla.egg-info/ src/hydrilla/_version.py \
+ src/hydrilla/locales/messages.pot make-release.log \
+ haketilo-and-hydrilla-bin-*.tar.gz .mypy_cache/ .pytest_cache/
find src/hydrilla/locales/ -name "messages.mo" -delete
rm -rf $$(find -name "__pycache__")
-.PHONY: release shell shell-with-haketilo dist wheel catalogs refresh-catalogs \
- test run-haketilo clean-source-tarball-repack clean-bin-tarball-repack \
- clean
+.PHONY: shell shell-with-haketilo \
+ release dist wheel catalogs \
+ refresh-catalogs test run-haketilo \
+ mypy-lint mypy-lint-server mypy-lint-builder mypy-lint-haketilo \
+ clean-bin-tarball-repack clean-source-tarball-repack clean
diff --git a/README.md b/README.md
index ae46b6a..bd2df75 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,13 @@ Runs the automated test suite.
### `make run-haketilo`
Runs `haketilo` program from sources.
+### `mypy-lint`
+Runs mypy static type checker over source files of the project.
+
+### `mypy-lint-server`, `mypy-lint-builder`, `mypy-lint-haketilo`
+Runs mypy static type checker over source files used in the relevant part of the
+project.
+
### `make clean`
Removes generated files.