[stdlib] Mark constants as Final (#14577)

This commit is contained in:
Semyon Moroz
2025-08-15 13:19:03 +02:00
committed by GitHub
parent 554701e9b6
commit 85a787bba3
62 changed files with 1601 additions and 1583 deletions
+7 -7
View File
@@ -7,7 +7,7 @@ from re import Pattern
from socket import socket
from ssl import SSLContext
from types import TracebackType
from typing import Any, Protocol, overload, type_check_only
from typing import Any, Final, Protocol, overload, type_check_only
from typing_extensions import Self, TypeAlias
__all__ = [
@@ -30,12 +30,12 @@ __all__ = [
_Reply: TypeAlias = tuple[int, bytes]
_SendErrs: TypeAlias = dict[str, _Reply]
SMTP_PORT: int
SMTP_SSL_PORT: int
CRLF: str
bCRLF: bytes
SMTP_PORT: Final = 25
SMTP_SSL_PORT: Final = 465
CRLF: Final[str]
bCRLF: Final[bytes]
OLDSTYLE_AUTH: Pattern[str]
OLDSTYLE_AUTH: Final[Pattern[str]]
class SMTPException(OSError): ...
class SMTPNotSupportedError(SMTPException): ...
@@ -182,7 +182,7 @@ class SMTP_SSL(SMTP):
context: SSLContext | None = None,
) -> None: ...
LMTP_PORT: int
LMTP_PORT: Final = 2003
class LMTP(SMTP):
def __init__(