mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Narrow `Generator[T, None, None] types to Iterator[T]` (#12241)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user