Skip to content
Closed
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
26 changes: 26 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Run mypy

on:
push:
pull_request:

jobs:
OSX:
runs-on: macos-latest
strategy:
matrix:
python: ["3.10", 3.14]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python ${{ matrix.python }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python }}
- name: Install mypy
run: |
pip install mypy
- name: Run mypy
run: |
mypy python

17 changes: 17 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[mypy]
python_version = 3.10
warn_return_any = False
warn_unused_configs = True

# Files to exclude
exclude = (?x)(
python/lwt_interface/cython_example/setup.py|
python/lwt_interface/setup.py|
python/setup.py
)

namespace_packages = False


# Suppressing errors
disable_error_code = assignment,attr-defined,index,empty-body,var-annotated,call-overload,syntax,union-attr,misc,import-not-found,import-untyped
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@ repos:
args: [--skip-errors]
additional_dependencies: [black==22.3.0]
language_version: python3
- repo: local
hooks:
- id: mypy
name: mypy
language: system
entry: mypy
files: \.py$

Loading