diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54b636e5..f19b03b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,8 @@ jobs: # TODO: don't continue on error - name: basedmypy stubtest - run: poetry run stubtest --concise --ignore-positional-only --mypy-config-file=pyproject.toml --allowlist=tests/stubtest/allowlist.txt scipy + # run: poetry run stubtest --concise --ignore-positional-only --mypy-config-file=pyproject.toml --allowlist=tests/stubtest/allowlist.txt scipy + run: poetry run poe stubtest -- --concise continue-on-error: true # TODO diff --git a/pyproject.toml b/pyproject.toml index cb82f7c4..8399077b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,7 @@ build-backend = "poetry.core.masonry.api" requires = ["poetry-core"] + [tool.poetry] authors = ["Joren Hammudoglu "] classifiers = [ @@ -42,6 +43,21 @@ ruff = "^0.6.3" poethepoet = "^0.28.0" pre-commit = "^3.8.0" +[tool.poe.executor] +type = "poetry" + +[tool.poe.tasks] +lint = "ruff check" +# stubtest = "stubtest --ignore-positional-only --mypy-config-file=pyproject.toml --allowlist=tests/stubtest/allowlist.txt scipy" +verifytypes = "basedpyright --level error --verifytypes scipy-stubs" + +[tool.poe.tasks.stubtest] +cmd = "stubtest --ignore-positional-only --mypy-config-file=pyproject.toml --allowlist=tests/stubtest/allowlist.txt $modules" +args = [ + {name = "modules", positional = true, multiple = true, default = "scipy"}, +] + + [tool.mypy] disable_bytearray_promotion = true disable_memoryview_promotion = true @@ -50,6 +66,7 @@ disallow_untyped_defs = false # TODO disallow_incomplete_defs = false # TODO warn_unused_ignores = true + [tool.pyright] include = ["scipy-stubs"] exclude = [".cache"] @@ -69,6 +86,7 @@ reportPrivateUsage = false reportUnnecessaryTypeIgnoreComment = true reportUnsafeMultipleInheritance = true + [tool.ruff] builtins = ["reveal_locals", "reveal_type"] exclude = ["scipy-pyright", ".venv"]