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/bytecode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coverage/bytecode.py') diff --git a/coverage/bytecode.py b/coverage/bytecode.py index e9a908f7..2cad4f9b 100644 --- a/coverage/bytecode.py +++ b/coverage/bytecode.py @@ -6,10 +6,10 @@ from __future__ import annotations from types import CodeType -from typing import Generator +from typing import Iterator -def code_objects(code: CodeType) -> Generator[CodeType, None, None]: +def code_objects(code: CodeType) -> Iterator[CodeType]: """Iterate over all the code objects in `code`.""" stack = [code] while stack: -- cgit v1.2.1