Skip to content

Commit

Permalink
add poe commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham committed Sep 4, 2024
1 parent 292727a commit 80f8cf2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]


[tool.poetry]
authors = ["Joren Hammudoglu <jhammudoglu@gmail.com>"]
classifiers = [
Expand Down Expand Up @@ -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
Expand All @@ -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"]
Expand All @@ -69,6 +86,7 @@ reportPrivateUsage = false
reportUnnecessaryTypeIgnoreComment = true
reportUnsafeMultipleInheritance = true


[tool.ruff]
builtins = ["reveal_locals", "reveal_type"]
exclude = ["scipy-pyright", ".venv"]
Expand Down

0 comments on commit 80f8cf2

Please sign in to comment.