Make ExitStack, AbstractContextManager and AsyncAbstractContextManager generic in return type of __exit__ (#11048)

This commit is contained in:
David Salvisberg
2024-04-22 16:43:08 +02:00
committed by GitHub
parent b3bfdadb45
commit f274c78fe5
5 changed files with 42 additions and 28 deletions

View File

@@ -794,7 +794,7 @@ def replace(
) -> None: ...
def rmdir(path: StrOrBytesPath, *, dir_fd: int | None = None) -> None: ...
class _ScandirIterator(Iterator[DirEntry[AnyStr]], AbstractContextManager[_ScandirIterator[AnyStr]]):
class _ScandirIterator(Iterator[DirEntry[AnyStr]], AbstractContextManager[_ScandirIterator[AnyStr], None]):
def __next__(self) -> DirEntry[AnyStr]: ...
def __exit__(self, *args: Unused) -> None: ...
def close(self) -> None: ...