diff --git a/pyproject.toml b/pyproject.toml index 923bc5f..c76d686 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,25 @@ force-single-line = true [tool.ruff.lint.pydocstyle] convention = "numpy" +[tool.ty.rules] +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.ty.overrides]] +include = ["src/**/__init__.py"] + +[tool.ty.overrides.rules] +unused-ignore-comment = "ignore" + + [tool.pytest.ini_options] # Do not add src since it messes with the loading of pytask-parallel as a plugin. testpaths = ["tests"] diff --git a/src/pytask_stata/__init__.py b/src/pytask_stata/__init__.py index f493641..111661a 100644 --- a/src/pytask_stata/__init__.py +++ b/src/pytask_stata/__init__.py @@ -1,7 +1,7 @@ from __future__ import annotations try: - from ._version import version as __version__ + from ._version import version as __version__ # ty: ignore[unresolved-import] except ImportError: # broken installation, we don't even try unknown only works because we do poor mans # version compare diff --git a/tests/test_execute.py b/tests/test_execute.py index 73a1668..1107876 100644 --- a/tests/test_execute.py +++ b/tests/test_execute.py @@ -30,7 +30,7 @@ def test_pytask_execute_task_setup_raise_error(stata, platform, expectation): task = Task( base_name="task_example", path=Path(), - function=lambda: None, # ty: ignore[invalid-argument-type] + function=lambda: None, markers=[Mark("stata", (), {})], )