Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ dev = [
"mypy>=2.3.0",
"prek>=0.4.12",
"ruff>=0.16.1",
"ty==0.0.84",
"ty==0.0.86",
]
docs = [
"myst-parser>=5.1.0",
Expand Down
6 changes: 3 additions & 3 deletions src/pystormtracker/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import logging
import os
from collections.abc import Iterator
from collections.abc import Generator
from concurrent.futures import ThreadPoolExecutor
from contextlib import contextmanager
from contextvars import ContextVar
Expand Down Expand Up @@ -37,7 +37,7 @@


@contextmanager
def local_dask_executor(workers: int) -> Iterator[None]:
def local_dask_executor(workers: int) -> Generator[None, None, None]:
"""Own one Dask thread pool for the duration of a tracking computation.

Dask's public ``pool`` configuration selects this executor without using
Expand Down Expand Up @@ -78,7 +78,7 @@ def drain_pending_dask_executors() -> None:


@contextmanager
def defer_dask_interrupt_cleanup() -> Iterator[None]:
def defer_dask_interrupt_cleanup() -> Generator[None, None, None]:
"""Defer first-Ctrl-C Dask draining to the CLI interruption handler.

This context is opt-in. Python-library callers get complete
Expand Down
4 changes: 2 additions & 2 deletions src/pystormtracker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import os
import signal
import sys
from collections.abc import Iterator
from collections.abc import Generator
from contextlib import contextmanager

from . import __version__, compare, convert, sample, track
Expand Down Expand Up @@ -37,7 +37,7 @@ def _emergency_interrupt(signum: int, frame: object) -> None:


@contextmanager
def _cli_interrupt_handlers() -> Iterator[None]:
def _cli_interrupt_handlers() -> Generator[None, None, None]:
"""Install first-interrupt cancellation and second-interrupt emergency exit."""
previous = signal.getsignal(signal.SIGINT)
signal.signal(signal.SIGINT, _first_interrupt)
Expand Down
4 changes: 2 additions & 2 deletions src/pystormtracker/hodges/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys
import time
from collections import deque
from collections.abc import Callable, Iterator
from collections.abc import Callable, Generator
from contextlib import contextmanager
from contextvars import ContextVar
from dataclasses import dataclass
Expand All @@ -29,7 +29,7 @@


@contextmanager
def hodges_dask_progress(enabled: bool | None) -> Iterator[None]:
def hodges_dask_progress(enabled: bool | None) -> Generator[None, None, None]:
"""Temporarily override interactive Dask progress for Hodges tracking."""
token = _PROGRESS_OVERRIDE.set(enabled)
try:
Expand Down
4 changes: 2 additions & 2 deletions src/pystormtracker/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import logging
import sys
from collections.abc import Iterator
from collections.abc import Generator
from contextlib import contextmanager
from threading import RLock
from typing import Protocol, TextIO
Expand Down Expand Up @@ -122,7 +122,7 @@ def configure_cli_logging(verbosity: int) -> None:


@contextmanager
def terminal_output() -> Iterator[None]:
def terminal_output() -> Generator[None, None, None]:
"""Hold the shared terminal lock for a coordinated output operation."""
with _TERMINAL_LOCK:
yield
Loading
Loading