Skip to content
Merged
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
28 changes: 28 additions & 0 deletions .github/workflows/pr-linters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run PR linters

on:
pull_request:
workflow_dispatch:

permissions:
contents: read
pull-requests: read

jobs:

mypy:
name: Run mypy static type checker (optional)
runs-on: ubuntu-latest
continue-on-error: true
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 .
- name: Run mypy and report
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
Loading