From 8ff3c6dfe6207dc79ed7be5105675d2f08725b76 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 5 Jan 2023 07:12:49 -0500 Subject: mypy: Iterator is better than Generator --- coverage/debug.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'coverage/debug.py') diff --git a/coverage/debug.py b/coverage/debug.py index a3d1dfa8..145802b1 100644 --- a/coverage/debug.py +++ b/coverage/debug.py @@ -18,8 +18,7 @@ import types import _thread from typing import ( - Any, Callable, Generator, IO, Iterable, Iterator, Optional, List, Tuple, - cast, + Any, Callable, IO, Iterable, Iterator, Optional, List, Tuple, cast, ) from coverage.misc import isolate_module @@ -65,7 +64,7 @@ class DebugControl: return (option in self.options) @contextlib.contextmanager - def without_callers(self) -> Generator[None, None, None]: + def without_callers(self) -> Iterator[None]: """A context manager to prevent call stacks from being logged.""" old = self.suppress_callers self.suppress_callers = True -- cgit v1.2.1