Replace 'Text' with 'str' in py3 stdlib (#5466)

This commit is contained in:
Sebastian Rittau authored and GitHub committed 2021-05-16 07:10:48 -07:00
1 parent dbe77b6ae9
commit 6a9c89e928
49 files changed
+328 -349

No files matched your search

+2 -2
View File
@@ -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: ...
+4 -4
View File
@@ -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__(