From aa4c635e6ab256ac308e6570dd51ebd9ddb9b02a Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Mon, 2 Sep 2024 22:38:04 -0400 Subject: [PATCH] add mypy to ci (but ignore for now), add numpy typing plugin --- .github/workflows/ci.yml | 13 ++++++++++--- pyproject.toml | 7 +++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a89a4f..2da361f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ on: - '**.md' - '.gitignore' jobs: - lint: - name: Lint + check: + name: Check runs-on: ubuntu-latest steps: @@ -30,8 +30,15 @@ jobs: - name: Install Python packages run: pip install ".[lint]" - - name: Run ruff + - name: Linter run: ruff check . + + - name: Formatter + run: ruff format --check + + # TODO: enable when passing + # - name: Type checker + # run: mypy flopy4 build: name: Build diff --git a/pyproject.toml b/pyproject.toml index bfda02d..b2dc08f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -105,3 +105,10 @@ ignore = [ "F821", # undefined name TODO FIXME "E722" # do not use bare `except` ] + +[tool.mypy] +packages = ["flopy4"] +modules = ["test"] +plugins = [ + "numpy.typing.mypy_plugin" +] \ No newline at end of file