mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-26 21:08:59 +08:00
Use PEP 570 syntax in stdlib (#11250)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user