diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e606152..c734a03 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,12 +28,12 @@ repos: - id: python-use-type-annotations - id: text-unicode-replacement-char - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.2 hooks: - id: ruff-check - id: ruff-format - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.9.18 + rev: 0.10.4 hooks: - id: uv-lock - repo: https://github.com/executablebooks/mdformat @@ -45,7 +45,7 @@ repos: - mdformat-black args: [--wrap, "88"] - repo: https://github.com/crate-ci/typos - rev: v1.40.1 + rev: v1 hooks: - id: typos - repo: meta diff --git a/src/pytask_stata/collect.py b/src/pytask_stata/collect.py index de12e14..0041849 100644 --- a/src/pytask_stata/collect.py +++ b/src/pytask_stata/collect.py @@ -7,6 +7,7 @@ import warnings from pathlib import Path from typing import Any +from typing import cast from pytask import Mark from pytask import NodeInfo @@ -63,7 +64,7 @@ def pytask_collect_task( mark = _parse_stata_mark(mark=marks[0]) script, options = stata(**marks[0].kwargs) - obj.pytask_meta.markers.append(mark) # ty: ignore[possibly-missing-attribute] + cast("Any", obj).pytask_meta.markers.append(mark) # Collect the nodes in @pytask.mark.julia and validate them. path_nodes = Path.cwd() if path is None else path.parent