mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-10 05:22:23 +08:00
Replace 'Text' with 'str' in py3 stdlib (#5466)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import IO, Any, Iterable, List, NoReturn, Optional, Text, Union
|
||||
from typing import IO, Any, Iterable, List, NoReturn, Optional, Union
|
||||
from xml.sax.handler import ContentHandler, ErrorHandler
|
||||
from xml.sax.xmlreader import Locator, XMLReader
|
||||
|
||||
@@ -29,5 +29,5 @@ else:
|
||||
def make_parser(parser_list: List[str] = ...) -> XMLReader: ...
|
||||
|
||||
def parse(source: Union[str, IO[str], IO[bytes]], handler: ContentHandler, errorHandler: ErrorHandler = ...) -> None: ...
|
||||
def parseString(string: Union[bytes, Text], handler: ContentHandler, errorHandler: Optional[ErrorHandler] = ...) -> None: ...
|
||||
def parseString(string: Union[bytes, str], handler: ContentHandler, errorHandler: Optional[ErrorHandler] = ...) -> None: ...
|
||||
def _create_parser(parser_name: str) -> XMLReader: ...
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
from _typeshed import SupportsWrite
|
||||
from codecs import StreamReaderWriter, StreamWriter
|
||||
from io import RawIOBase, TextIOBase
|
||||
from typing import Mapping, Optional, Text, Union
|
||||
from typing import Mapping, Optional, Union
|
||||
from xml.sax import handler, xmlreader
|
||||
|
||||
def escape(data: Text, entities: Mapping[Text, Text] = ...) -> Text: ...
|
||||
def unescape(data: Text, entities: Mapping[Text, Text] = ...) -> Text: ...
|
||||
def quoteattr(data: Text, entities: Mapping[Text, Text] = ...) -> Text: ...
|
||||
def escape(data: str, entities: Mapping[str, str] = ...) -> str: ...
|
||||
def unescape(data: str, entities: Mapping[str, str] = ...) -> str: ...
|
||||
def quoteattr(data: str, entities: Mapping[str, str] = ...) -> str: ...
|
||||
|
||||
class XMLGenerator(handler.ContentHandler):
|
||||
def __init__(
|
||||
|
||||
Reference in New Issue
Block a user