Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,18 @@ jobs:
run: python3 -m pip install -r doc/requirements.txt -e .
- name: Build docs
run: make -C doc html

mypy:
continue-on-error: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks a little strange to see "Python package / mypy (pull_request)" as the title for this check. I'm leaning towards moving it to a separate workflow file. Or is there any particular reason why it should be linked with the pythonpackage.yml?

Either way, we should give it a more appealing name such as - name: Run mypy static type checker

For the possibly new workflow file, we could use a more generic name / title and keep in mind that more checkers / linters might be added there later. Something like "Check correctness" or "Static code analysis".

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
cache-dependency-path: |
'pyproject.toml'
'requirements-dev.txt'
- run: pip install -r requirements-dev.txt -e .
- run: mypy --config-file pyproject.toml .
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ testpaths = [
filterwarnings = [
"ignore::DeprecationWarning",
]

[tool.mypy]
python_version = "3.8"
exclude = [
"^examples*",
"^test*",
"^setup.py*",
]
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
mypy~=1.10
pytest~=8.3
pytest-cov~=5.0