Skip to content

Commit 3661a3a

Browse files
committed
Improve type checking.
1 parent 25f336b commit 3661a3a

File tree

5 files changed

+27
-26
lines changed

5 files changed

+27
-26
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ on:
1515

1616
jobs:
1717

18+
run-type-checking:
19+
20+
name: Run tests for type-checking
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version-file: .python-version
28+
allow-prereleases: true
29+
cache: pip
30+
- run: pip install tox-uv
31+
- run: tox -e typing
32+
1833
run-tests:
1934

2035
name: Run tests for ${{ matrix.os }} on ${{ matrix.environment }}

.pre-commit-config.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,6 @@ repos:
4242
mdformat-black,
4343
]
4444
args: [--wrap, "88"]
45-
- repo: https://github.com/pre-commit/mirrors-mypy
46-
rev: 'v1.10.0'
47-
hooks:
48-
- id: mypy
49-
additional_dependencies: [
50-
attrs>=21.3.0,
51-
click,
52-
pytask>=0.4.0,
53-
types-PyYAML,
54-
types-setuptools
55-
]
56-
pass_filenames: false
5745
- repo: https://github.com/codespell-project/codespell
5846
rev: v2.2.6
5947
hooks:

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask-julia) and
1111
- {pull}`32` uses trusted publishing for PyPI.
1212
- {pull}`33` uses uuid4 to generate more robust file names for serialized arguments.
1313
- {pull}`36` updates tests for pytask v0.5.
14+
- {pull}`37` improves type-checking.
1415

1516
## 0.4.0 - 2023-10-08
1617

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pytask_julia = "pytask_julia.plugin"
3535

3636
[project.optional-dependencies]
3737
test = ["pytask-parallel", "pytest", "pytest-cov", "pytest-xdist", "pyyaml"]
38+
typing = ["mypy", "pyyaml", "types-PyYAML"]
3839

3940
[tool.rye]
4041
managed = true

tox.ini

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
[tox]
2-
envlist = pytest
2+
requires = tox>=4
3+
envlist = test, typing
34

45
[testenv]
56
allowlist_externals = julia
67
passenv = CI
7-
usedevelop = true
8+
package = editable
89

9-
[testenv:pytest]
10-
deps =
11-
# Package dependencies
12-
pytask >=0.4.0
13-
pytask-parallel >=0.4.0
14-
15-
# Optional package dependencies
16-
pyyaml
17-
18-
pytest
19-
pytest-cov
20-
pytest-xdist
10+
[testenv:test]
11+
extras = test
2112
commands =
2213
julia --project=. --eval "import Pkg; Pkg.instantiate()"
2314
pytest {posargs}
15+
16+
17+
[testenv:typing]
18+
extras = typing
19+
commands = mypy

0 commit comments

Comments
 (0)