[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
+14 -14
View File
@@ -3,24 +3,24 @@ from collections.abc import Iterable
from re import Match, Pattern as _Pattern
from sre_constants import *
from sre_constants import _NamedIntConstant as _NIC, error as _Error
from typing import Any, overload
from typing import Any, Final, overload
from typing_extensions import TypeAlias
SPECIAL_CHARS: str
REPEAT_CHARS: str
DIGITS: frozenset[str]
OCTDIGITS: frozenset[str]
HEXDIGITS: frozenset[str]
ASCIILETTERS: frozenset[str]
WHITESPACE: frozenset[str]
ESCAPES: dict[str, tuple[_NIC, int]]
CATEGORIES: dict[str, tuple[_NIC, _NIC] | tuple[_NIC, list[tuple[_NIC, _NIC]]]]
FLAGS: dict[str, int]
TYPE_FLAGS: int
GLOBAL_FLAGS: int
SPECIAL_CHARS: Final = ".\\[{()*+?^$|"
REPEAT_CHARS: Final = "*+?{"
DIGITS: Final[frozenset[str]]
OCTDIGITS: Final[frozenset[str]]
HEXDIGITS: Final[frozenset[str]]
ASCIILETTERS: Final[frozenset[str]]
WHITESPACE: Final[frozenset[str]]
ESCAPES: Final[dict[str, tuple[_NIC, int]]]
CATEGORIES: Final[dict[str, tuple[_NIC, _NIC] | tuple[_NIC, list[tuple[_NIC, _NIC]]]]]
FLAGS: Final[dict[str, int]]
TYPE_FLAGS: Final[int]
GLOBAL_FLAGS: Final[int]
if sys.version_info >= (3, 11):
MAXWIDTH: int
MAXWIDTH: Final[int]
if sys.version_info < (3, 11):
class Verbose(Exception): ...