mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 13:21:11 +08:00
stdlib: Add several missing @abstractmethod decorators (#7443)
This commit is contained in:
@@ -12,6 +12,7 @@ from _typeshed import (
|
||||
StrPath,
|
||||
structseq,
|
||||
)
|
||||
from abc import abstractmethod
|
||||
from builtins import OSError
|
||||
from contextlib import AbstractContextManager
|
||||
from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOWrapper as _TextIOWrapper
|
||||
@@ -371,6 +372,7 @@ class stat_result(structseq[float], tuple[int, int, int, int, int, int, int, flo
|
||||
|
||||
@runtime_checkable
|
||||
class PathLike(Protocol[_AnyStr_co]):
|
||||
@abstractmethod
|
||||
def __fspath__(self) -> _AnyStr_co: ...
|
||||
|
||||
@overload
|
||||
@@ -728,6 +730,7 @@ def rmdir(path: StrOrBytesPath, *, dir_fd: int | None = ...) -> None: ...
|
||||
|
||||
class _ScandirIterator(Iterator[DirEntry[AnyStr]], AbstractContextManager[_ScandirIterator[AnyStr]]):
|
||||
def __next__(self) -> DirEntry[AnyStr]: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
|
||||
Reference in New Issue
Block a user