Use PEP 570 syntax in third party stubs (#11554)

This commit is contained in:
Shantanu
2024-03-10 06:11:43 -07:00
committed by GitHub
parent f94bbfbcc4
commit 88fa182253
97 changed files with 625 additions and 632 deletions
+4 -4
View File
@@ -10,13 +10,13 @@ from .util import HtmlStash, Registry
# TODO: The following protocols can be replaced by their counterparts from
# codecs, once they have been propagated to all type checkers.
class _WritableStream(Protocol):
def write(self, __data: bytes) -> object: ...
def seek(self, __offset: int, __whence: int) -> object: ...
def write(self, data: bytes, /) -> object: ...
def seek(self, offset: int, whence: int, /) -> object: ...
def close(self) -> object: ...
class _ReadableStream(Protocol):
def read(self, __size: int = ...) -> bytes: ...
def seek(self, __offset: int, __whence: int) -> object: ...
def read(self, size: int = ..., /) -> bytes: ...
def seek(self, offset: int, whence: int, /) -> object: ...
def close(self) -> object: ...
class Markdown: