Use PEP 570 syntax in stdlib (#11250)

This commit is contained in:
Shantanu
2024-03-09 14:50:16 -08:00
committed by GitHub
parent 63737acac6
commit 470a13ab09
139 changed files with 2412 additions and 2371 deletions

View File

@@ -22,15 +22,15 @@ FNAME: int # actually Literal[8] # undocumented
FCOMMENT: int # actually Literal[16] # undocumented
class _ReadableFileobj(Protocol):
def read(self, __n: int) -> bytes: ...
def seek(self, __n: int) -> object: ...
def read(self, n: int, /) -> bytes: ...
def seek(self, n: int, /) -> object: ...
# The following attributes and methods are optional:
# name: str
# mode: str
# def fileno() -> int: ...
class _WritableFileobj(Protocol):
def write(self, __b: bytes) -> object: ...
def write(self, b: bytes, /) -> object: ...
def flush(self) -> object: ...
# The following attributes and methods are optional:
# name: str