Skip to content

Commit

Permalink
Merge pull request #15 from jorenham/poe
Browse files Browse the repository at this point in the history
add `poe` commands
  • Loading branch information
jorenham authored Sep 4, 2024
2 parents 292727a + 2a8d05f commit 649ed35
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: install poetry
run: |
pipx install poetry
pipx install poetry poethepoet
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
Expand All @@ -51,8 +51,9 @@ jobs:
continue-on-error: true

# 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
- name: mypy.stubtest (based)
# run: poetry run stubtest --concise --ignore-positional-only --mypy-config-file=pyproject.toml --allowlist=tests/stubtest/allowlist.txt scipy
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 649ed35

Please sign in to comment.