From 7326b0b1cd5005ab35f5807b246141d9cb6a60cb Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 7 Oct 2026 10:03:13 +0000 Subject: [PATCH] Fix ty 0.0.85 diagnostics in vortex-python CI runs `uvx ty check` without a version pin, so ty 0.0.85 now fails `Python (lint)` on every branch. It wants `Generator[None]` instead of `Iterator[None]` on a `@contextmanager`, and it flags a redundant `cast` in `test_expr.py`. Both changes are annotation-only and also pass ty 0.0.84. Signed-off-by: Claude Claude-Session: https://claude.ai/code/session_018FefTpTuDky8bGPr5R9Loq --- vortex-python/python/vortex/dataset.py | 4 ++-- vortex-python/test/test_expr.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vortex-python/python/vortex/dataset.py b/vortex-python/python/vortex/dataset.py index 244b6b904a8..99ebb5ee32b 100644 --- a/vortex-python/python/vortex/dataset.py +++ b/vortex-python/python/vortex/dataset.py @@ -4,7 +4,7 @@ from __future__ import annotations import warnings -from collections.abc import Iterator +from collections.abc import Generator, Iterator from contextlib import contextmanager from functools import reduce from typing import final @@ -23,7 +23,7 @@ @contextmanager -def _temporary_worker_threads(use_threads: bool) -> Iterator[None]: +def _temporary_worker_threads(use_threads: bool) -> Generator[None]: previous_workers = _worker_threads() if use_threads: _set_worker_threads(None) diff --git a/vortex-python/test/test_expr.py b/vortex-python/test/test_expr.py index ed5cf3bee76..eebaa9be130 100644 --- a/vortex-python/test/test_expr.py +++ b/vortex-python/test/test_expr.py @@ -39,7 +39,7 @@ def names(vxf: vx.VortexFile, expr: Expr) -> list[str | None]: def column_values(vxf: vx.VortexFile, projection: Expr) -> list[object]: table = vxf.scan(ve.pack({"value": projection})).read_all().to_arrow_table() - return cast(list[object], table.column("value").to_pylist()) + return table.column("value").to_pylist() # --------------------------------------------------------------------------------------