mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Improve the definition of os._ScandirIterator (#13013)
This commit is contained in:
@@ -22,7 +22,6 @@ from _typeshed import (
|
||||
from abc import abstractmethod
|
||||
from builtins import OSError
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping, Sequence
|
||||
from contextlib import AbstractContextManager
|
||||
from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOWrapper
|
||||
from subprocess import Popen
|
||||
from types import TracebackType
|
||||
@@ -794,9 +793,12 @@ def replace(
|
||||
src: StrOrBytesPath, dst: StrOrBytesPath, *, src_dir_fd: int | None = None, dst_dir_fd: int | None = None
|
||||
) -> None: ...
|
||||
def rmdir(path: StrOrBytesPath, *, dir_fd: int | None = None) -> None: ...
|
||||
|
||||
class _ScandirIterator(Iterator[DirEntry[AnyStr]], AbstractContextManager[_ScandirIterator[AnyStr], None]):
|
||||
@final
|
||||
class _ScandirIterator(Generic[AnyStr]):
|
||||
def __del__(self) -> None: ...
|
||||
def __iter__(self) -> Self: ...
|
||||
def __next__(self) -> DirEntry[AnyStr]: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user