mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use Generator instead of Iterator for 3rd-party context managers (#12481)
This commit is contained in:
@@ -13,7 +13,7 @@ import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
from collections.abc import Callable, Iterator
|
||||
from collections.abc import Callable, Generator
|
||||
from contextlib import ExitStack, contextmanager, suppress
|
||||
from dataclasses import dataclass
|
||||
from enum import IntEnum
|
||||
@@ -316,7 +316,7 @@ def concurrently_run_testcases(
|
||||
@contextmanager
|
||||
def cleanup_threads(
|
||||
event: threading.Event, printer_thread: threading.Thread, executor: concurrent.futures.ThreadPoolExecutor
|
||||
) -> Iterator[None]:
|
||||
) -> Generator[None]:
|
||||
try:
|
||||
yield
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user