Skip to content

Commit

Permalink
check: verify python with mypy
Browse files Browse the repository at this point in the history
Verify all our python scripts with mypy during `make check'.

Also, install mypy during CI and mention it in the README.

Signed-off-by: Vincent Stehlé <[email protected]>
  • Loading branch information
vstehle committed Sep 27, 2023
1 parent 73bce93 commit 5b64ced
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
sudo apt update
sudo apt install python3-pip latexmk libalgorithm-diff-perl texlive \
texlive-latex-extra texlive-humanities flake8
texlive-latex-extra texlive-humanities flake8 mypy
- name: 'Install Python required packages'
run: |
Expand Down
2 changes: 2 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mypy]
strict = true
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ help:
check:
! grep -r --file=.typos.txt --exclude=.typos.txt --exclude-dir=.git
flake8 .
mypy .
$(SPHINXBUILD) -M linkcheck "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Requirements

* Sphinx version 1.5 or later: http://sphinx-doc.org/en/master/contents.html
* LaTeX (and pdflatex, and various LaTeX packages)
* Optionally, for verification: ``flake8``
* Optionally, for verification: ``flake8`` and ``mypy``

On Debian and Ubuntu
^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 5b64ced

Please sign in to comment.