Skip to content

Commit

Permalink
Merge pull request #25 from freedomofpress/mypy
Browse files Browse the repository at this point in the history
Add mypy for type checking

(cherry picked from commit freedomofpress/securedrop-updater@4b569af)
  • Loading branch information
eaon authored and cfm committed Apr 23, 2024
1 parent 11c5527 commit f50279e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ check: lint test ## Runs linters and tests

.PHONY: lint
lint: check-black check-isort flake8 bandit mypy rpmlint shellcheck ## Runs linters (black, isort, flake8, bandit rpmlint, and shellcheck)
lint: check-black check-isort flake8 mypy bandit rpmlint shellcheck ## Runs linters (black, isort, flake8, mypy, bandit rpmlint, and shellcheck)

.PHONY: bandit
bandit: ## Runs the bandit security linter
Expand Down Expand Up @@ -203,10 +204,9 @@ isort: ## Update Python import organization with isort
flake8: ## Validate PEP8 compliance for Python source files
flake8

mypy: ## Type checks Python files
# Not requiring dom0 since linting requires extra packages,
# available only in the developer environment, i.e. Work VM.
mypy
.PHONY: mypy
mypy: ## Type check Python files
mypy .

.PHONY: rpmlint
rpmlint: ## Runs rpmlint on the spec file
Expand Down
2 changes: 2 additions & 0 deletions requirements/dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ isort
mypy
pip-tools
pip
PyQt5-stubs
pytest
pytest-cov
reprotest
types-setuptools
8 changes: 8 additions & 0 deletions requirements/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ pyproject-hooks==1.0.0 \
--hash=sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8 \
--hash=sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5
# via build
pyqt5-stubs==5.15.6.0 \
--hash=sha256:7fb8177c72489a8911f021b7bd7c33f12c87f6dba92dcef3fdcdb5d9400f0f3f \
--hash=sha256:91270ac23ebf38a1dc04cd97aa852cd08af82dc839100e5395af1447e3e99707
# via -r requirements/dev-requirements.in
pytest==7.2.1 \
--hash=sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5 \
--hash=sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42
Expand Down Expand Up @@ -321,6 +325,10 @@ tomli==1.2.3 \
# mypy
# pyproject-hooks
# pytest
types-setuptools==69.5.0.20240415 \
--hash=sha256:637cdb24a0d48a6ab362c09cfe3b89ecaa1c10666a8ba9452924e9a0ae00fa4a \
--hash=sha256:ea64af0a96a674f8c40ba34c09c254f3c70bc3f218c6bffa1d0912bd91584a2f
# via -r requirements/dev-requirements.in
typing-extensions==4.10.0 \
--hash=sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475 \
--hash=sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb
Expand Down

0 comments on commit f50279e

Please sign in to comment.