From 6fbde9060633144f9bb3f09c8d03324bf91c543b Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Tue, 30 Dec 2025 15:14:16 +0100 Subject: [PATCH 1/2] Add ty overrides for version module --- pyproject.toml | 7 +++++++ src/pytask_julia/__init__.py | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 581ca70..c85572e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,6 +88,13 @@ unused-ignore-comment = "error" [tool.ty.terminal] error-on-warning = true +[[tool.ty.overrides]] +include = ["src/**/_version.py"] + +[tool.ty.overrides.rules] +invalid-type-form = "ignore" + + [tool.pytest.ini_options] testpaths = ["src", "tests"] markers = [ diff --git a/src/pytask_julia/__init__.py b/src/pytask_julia/__init__.py index d0fff47..e509ae9 100644 --- a/src/pytask_julia/__init__.py +++ b/src/pytask_julia/__init__.py @@ -3,7 +3,9 @@ from __future__ import annotations try: - from ._version import version as __version__ + from ._version import ( + version as __version__, # ty: ignore[unresolved-import, unused-ignore-comment] + ) except ImportError: # pragma: no cover # broken installation, we don't even try unknown only works because we do poor mans # version compare From ca4f2410c6a1e899cce9a2d5d4e6ed4e27bb9c98 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Tue, 30 Dec 2025 15:30:29 +0100 Subject: [PATCH 2/2] Fix ty ignores --- pixi.lock | 4 ++-- pyproject.toml | 6 ++++++ src/pytask_julia/__init__.py | 4 +--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pixi.lock b/pixi.lock index ebc3e5b..fbd0968 100644 --- a/pixi.lock +++ b/pixi.lock @@ -6738,8 +6738,8 @@ packages: requires_python: '>=3.10' - pypi: ./ name: pytask-julia - version: 0.4.1.dev35+gf8081d491.d20251230 - sha256: cecdcaf711ddc36cb43b99a17c527009e65b3a6e8f32d294f37ec372a6bf7cf5 + version: 0.4.1.dev34+g6fbde9060.d20251230 + sha256: 59085922040610b4bec0231ac99763b10a7de11888c3144fc2c71c4b1d00eb92 requires_dist: - click - pluggy>=1.0.0 diff --git a/pyproject.toml b/pyproject.toml index c85572e..e26f028 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,6 +94,12 @@ include = ["src/**/_version.py"] [tool.ty.overrides.rules] invalid-type-form = "ignore" +[[tool.ty.overrides]] +include = ["src/**/__init__.py"] + +[tool.ty.overrides.rules] +unused-ignore-comment = "ignore" + [tool.pytest.ini_options] testpaths = ["src", "tests"] diff --git a/src/pytask_julia/__init__.py b/src/pytask_julia/__init__.py index e509ae9..ac64b33 100644 --- a/src/pytask_julia/__init__.py +++ b/src/pytask_julia/__init__.py @@ -3,9 +3,7 @@ from __future__ import annotations try: - from ._version import ( - version as __version__, # ty: ignore[unresolved-import, unused-ignore-comment] - ) + from ._version import version as __version__ # ty: ignore[unresolved-import] except ImportError: # pragma: no cover # broken installation, we don't even try unknown only works because we do poor mans # version compare