diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a88747c..bcc7e90 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,3 +40,17 @@ jobs: - name: Run linter run: flake8 ./src + + typechecker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y python3 python3-pip + + - name: Run build + run: pip3 install .[dev] + + - name: Run typechecker + run: mypy diff --git a/pyproject.toml b/pyproject.toml index b3b104f..271bb74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,3 +36,13 @@ markers = [ "overnight: for tests that take hours to complete (deselect with '-m \"not overnight\"')", "serial" ] + +[tool.mypy] +files = ["src"] +ignore_missing_imports = true +strict_optional = true +allow_untyped_calls = false +warn_return_any = true +warn_unused_ignores = true +disallow_untyped_defs = false +strict = true