Use Final for Constant Literals in the stdlib (#12332)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Max MuotoandAlex Waygood authored and GitHub committed 2024-07-15 18:07:34 +01:00
1 parent 02b05d67c4
commit 0df6028dc8
41 files changed
+569 -572

No files matched your search

+6 -6
View File
@@ -4,16 +4,16 @@ from collections.abc import Callable, Iterable, Iterator
from socket import socket
from ssl import SSLContext
from types import TracebackType
from typing import Any, Literal, TextIO
from typing import Any, Final, Literal, TextIO
from typing_extensions import Self
__all__ = ["FTP", "error_reply", "error_temp", "error_perm", "error_proto", "all_errors", "FTP_TLS"]
MSG_OOB: Literal[1]
FTP_PORT: Literal[21]
MAXLINE: Literal[8192]
CRLF: Literal["\r\n"]
B_CRLF: Literal[b"\r\n"]
MSG_OOB: Final = 1
FTP_PORT: Final = 21
MAXLINE: Final = 8192
CRLF: Final = "\r\n"
B_CRLF: Final = b"\r\n"
class Error(Exception): ...
class error_reply(Error): ...