mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Replace 'Text' with 'str' in py3 stdlib (#5466)
This commit is contained in:
@@ -4,7 +4,7 @@ import time
|
||||
from socket import socket as _socket
|
||||
from ssl import SSLContext, SSLSocket
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, Callable, Dict, List, Optional, Pattern, Text, Tuple, Type, Union
|
||||
from typing import IO, Any, Callable, Dict, List, Optional, Pattern, Tuple, Type, Union
|
||||
from typing_extensions import Literal
|
||||
|
||||
# TODO: Commands should use their actual return types, not this type alias.
|
||||
@@ -17,17 +17,17 @@ class IMAP4:
|
||||
error: Type[Exception] = ...
|
||||
abort: Type[Exception] = ...
|
||||
readonly: Type[Exception] = ...
|
||||
mustquote: Pattern[Text] = ...
|
||||
mustquote: Pattern[str] = ...
|
||||
debug: int = ...
|
||||
state: str = ...
|
||||
literal: Optional[Text] = ...
|
||||
literal: Optional[str] = ...
|
||||
tagged_commands: Dict[bytes, Optional[List[bytes]]]
|
||||
untagged_responses: Dict[str, List[Union[bytes, Tuple[bytes, bytes]]]]
|
||||
continuation_response: str = ...
|
||||
is_readonly: bool = ...
|
||||
tagnum: int = ...
|
||||
tagpre: str = ...
|
||||
tagre: Pattern[Text] = ...
|
||||
tagre: Pattern[str] = ...
|
||||
welcome: bytes = ...
|
||||
capabilities: Tuple[str] = ...
|
||||
PROTOCOL_VERSION: str = ...
|
||||
@@ -41,7 +41,7 @@ class IMAP4:
|
||||
host: str = ...
|
||||
port: int = ...
|
||||
sock: _socket = ...
|
||||
file: Union[IO[Text], IO[bytes]] = ...
|
||||
file: Union[IO[str], IO[bytes]] = ...
|
||||
def read(self, size: int) -> bytes: ...
|
||||
def readline(self) -> bytes: ...
|
||||
def send(self, data: bytes) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user