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

@@ -24,14 +24,14 @@ _Model: TypeAlias = tuple[int, int, str | None, tuple[Any, ...]]
@final
class XMLParserType:
def Parse(self, __data: str | ReadableBuffer, __isfinal: bool = False) -> int: ...
def ParseFile(self, __file: SupportsRead[bytes]) -> int: ...
def SetBase(self, __base: str) -> None: ...
def Parse(self, data: str | ReadableBuffer, isfinal: bool = False, /) -> int: ...
def ParseFile(self, file: SupportsRead[bytes], /) -> int: ...
def SetBase(self, base: str, /) -> None: ...
def GetBase(self) -> str | None: ...
def GetInputContext(self) -> bytes | None: ...
def ExternalEntityParserCreate(self, __context: str | None, __encoding: str = ...) -> XMLParserType: ...
def SetParamEntityParsing(self, __flag: int) -> int: ...
def UseForeignDTD(self, __flag: bool = True) -> None: ...
def ExternalEntityParserCreate(self, context: str | None, encoding: str = ..., /) -> XMLParserType: ...
def SetParamEntityParsing(self, flag: int, /) -> int: ...
def UseForeignDTD(self, flag: bool = True, /) -> None: ...
@property
def intern(self) -> dict[str, str]: ...
buffer_size: int
@@ -75,7 +75,7 @@ class XMLParserType:
ExternalEntityRefHandler: Callable[[str, str | None, str | None, str | None], int] | None
SkippedEntityHandler: Callable[[str, bool], Any] | None
def ErrorString(__code: int) -> str: ...
def ErrorString(code: int, /) -> str: ...
# intern is undocumented
def ParserCreate(