Skip to content

Commit e8e7a46

Browse files
committed
Add ty overrides for version module
1 parent 9e1b83f commit e8e7a46

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ force-single-line = true
116116
[tool.ruff.lint.pydocstyle]
117117
convention = "numpy"
118118

119+
[tool.ty.rules]
120+
unused-ignore-comment = "error"
121+
122+
[tool.ty.terminal]
123+
error-on-warning = true
124+
125+
[[tool.ty.overrides]]
126+
include = ["src/**/_version.py"]
127+
128+
[tool.ty.overrides.rules]
129+
invalid-type-form = "ignore"
130+
131+
119132
[tool.pytest.ini_options]
120133
addopts = ["--nbmake"]
121134
# Do not add src since it messes with the loading of pytask-parallel as a plugin.

src/pytask_parallel/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
from pytask_parallel.backends import registry
99

1010
try:
11-
from ._version import version as __version__
11+
from ._version import (
12+
version as __version__, # ty: ignore[unresolved-import, unused-ignore-comment]
13+
)
1214
except ImportError:
1315
# broken installation, we don't even try unknown only works because we do poor mans
1416
# version compare

0 commit comments

Comments
 (0)