Use Generator instead of Iterator for 3rd-party context managers (#12481)

This commit is contained in:
Max Muoto authored and GitHub committed 2024-08-12 14:26:18 +02:00
1 parent 0b6f15c2ff
commit 37807d753a
14 files changed
+22 -22

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
import contextlib
import types
from _typeshed import StrOrBytesPath, StrPath
from collections.abc import Iterator
from collections.abc import Generator
from typing import Generic, TypeVar
from typing_extensions import TypeAlias
@@ -12,7 +12,7 @@ def to_bytes(s: _CDataBase | StrOrBytesPath | None, encoding: str = "utf-8", err
def to_str(s: StrOrBytesPath) -> str: ...
def ptr_to_bytes(ptr_cdata: _CDataBase) -> bytes: ...
@contextlib.contextmanager
def new_git_strarray() -> Iterator[_GitStrArray]: ...
def new_git_strarray() -> Generator[_GitStrArray]: ...
def strarray_to_strings(arr: _GitStrArray) -> list[str]: ...
# Actual type: _cffi_backend.__CDataOwn <cdata 'struct git_strarray *'>