mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use Final for Constant Literals in the stdlib (#12332)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import ssl
|
||||
import sys
|
||||
from builtins import list as _list # conflicts with a method named "list"
|
||||
from re import Pattern
|
||||
from typing import Any, BinaryIO, Literal, NoReturn, overload
|
||||
from typing import Any, BinaryIO, Final, NoReturn, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = ["POP3", "error_proto", "POP3_SSL"]
|
||||
@@ -12,11 +12,11 @@ _LongResp: TypeAlias = tuple[bytes, list[bytes], int]
|
||||
|
||||
class error_proto(Exception): ...
|
||||
|
||||
POP3_PORT: Literal[110]
|
||||
POP3_SSL_PORT: Literal[995]
|
||||
CR: Literal[b"\r"]
|
||||
LF: Literal[b"\n"]
|
||||
CRLF: Literal[b"\r\n"]
|
||||
POP3_PORT: Final = 110
|
||||
POP3_SSL_PORT: Final = 995
|
||||
CR: Final = b"\r"
|
||||
LF: Final = b"\n"
|
||||
CRLF: Final = b"\r\n"
|
||||
HAVE_SSL: bool
|
||||
|
||||
class POP3:
|
||||
|
||||
Reference in New Issue
Block a user