From b6711e447562f75b95762675ec867791f9000567 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Wed, 7 Oct 2026 19:11:08 +0300 Subject: [PATCH] fix: annotate context managers with Generator for ty 0.0.85 --- tests/test_end_of_file_fixer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_end_of_file_fixer.py b/tests/test_end_of_file_fixer.py index de89c5a..3ffa8f5 100644 --- a/tests/test_end_of_file_fixer.py +++ b/tests/test_end_of_file_fixer.py @@ -1,7 +1,7 @@ import os import sys import tempfile -from collections.abc import Iterator +from collections.abc import Generator from contextlib import contextmanager from io import StringIO from pathlib import Path @@ -12,7 +12,7 @@ @contextmanager -def _run_main_in(temp_dir: Path, argv: list[str]) -> Iterator[tuple[StringIO, StringIO]]: +def _run_main_in(temp_dir: Path, argv: list[str]) -> Generator[tuple[StringIO, StringIO]]: """Swap cwd, argv, stdout, stderr around a ``main()`` call.""" captured_stdout = StringIO() captured_stderr = StringIO()