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
35 changes: 34 additions & 1 deletion .github/workflows/tidy3d-python-client-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,33 @@ jobs:
run: ruff format --check --diff
- name: Run ruff check
run: ruff check tidy3d


mypy:
name: static-type-checks (mypy)
needs: determine-test-scope
if: needs.determine-test-scope.outputs.code_quality_tests == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false
persist-credentials: false

- name: set-python-3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install mypy
run: |
python -m pip install --upgrade pip
pip install "mypy==1.13.0"

- name: Run mypy
run: |
mypy --config-file=pyproject.toml

zizmor:
name: Run zizmor 🌈
runs-on: ubuntu-latest
Expand Down Expand Up @@ -637,6 +663,7 @@ jobs:
- local-tests
- remote-tests
- lint
- mypy
- verify-schema-change
- lint-commit-messages
- lint-branch-name
Expand All @@ -656,6 +683,12 @@ jobs:
run: |
echo "❌ Linting failed."
exit 1

- name: check-mypy-result
if: ${{ needs.determine-test-scope.outputs.code_quality_tests == 'true' && needs.mypy.result != 'success' }}
run: |
echo "❌ Mypy type checking failed."
exit 1

- name: check-schema-change-verification
if: ${{ needs.verify-schema-change.result != 'success' }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ repos:
hooks:
- id: mypy
name: mypy (type signatures)
files: ^tidy3d/web
pass_filenames: false
args:
- --config-file=pyproject.toml
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ python_files = "*.py"

[tool.mypy]
python_version = "3.10"
files = [
"tidy3d/web",
]
ignore_missing_imports = true
follow_imports = "skip"
disallow_untyped_defs = true
Expand Down
Loading