Skip to content

Commit

Permalink
Run mypy in CI (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
kytta authored Sep 11, 2024
1 parent e432f16 commit e71a850
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,15 @@ jobs:
name: coverage-html
path: htmlcov
if: ${{ failure() }}

mypy:
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: astral-sh/setup-uv@v2
- run: uvx mypy src
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,3 @@ repos:
rev: "v0.6.4"
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
18 changes: 6 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,11 @@ parallel = true
plugins = [ "covdefaults" ]

[tool.mypy]
python_version = 3.9
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
strict = true
pretty = true
python_version = "3.9"
enable_error_code = [ "ignore-without-code" ]

[[tool.mypy.overrides]]
module = [ "tests.*" ]
ignore_missing_imports = true
check_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_defs = false
module = "tests.*"
ignore_errors = true

0 comments on commit e71a850

Please sign in to comment.