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() # --------------------------------------------------------------------------------------