Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-358: Add mypy CI and config #518

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
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 .
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe just silence the return code?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That would work as a last resort, but I'd like to actually see the status already while we are in the process of making it pass.

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
Loading