Narrow `Generator[T, None, None] types to Iterator[T]` (#12241)

This commit is contained in:
Adam Turner
2024-04-09 03:26:44 +01:00
committed by GitHub
parent 413e740dca
commit 3421e5382a
20 changed files with 61 additions and 54 deletions

View File

@@ -14,7 +14,7 @@ import sphinx.pycode
from sphinx.testing.util import _clean_up_global_state
if TYPE_CHECKING:
from collections.abc import Generator
from collections.abc import Iterator
def _init_console(
@@ -52,7 +52,7 @@ def pytest_report_header(config: pytest.Config) -> str:
@pytest.fixture(autouse=True)
def _cleanup_docutils() -> Generator[None, None, None]:
def _cleanup_docutils() -> Iterator[None]:
saved_path = sys.path
yield # run the test
sys.path[:] = saved_path