[stdlib] Add missing Final (#14613)

This commit is contained in:
Semyon Moroz
2025-08-21 10:18:20 +00:00
committed by GitHub
parent 9b5b3ecb0a
commit 9bb8c4f1f9
30 changed files with 197 additions and 187 deletions
+3 -3
View File
@@ -52,7 +52,7 @@ else:
"seal",
)
FILTER_DIR: Any
FILTER_DIR: bool # controls the way mock objects respond to `dir` function
class _SentinelObject:
name: Any
@@ -61,7 +61,7 @@ class _SentinelObject:
class _Sentinel:
def __getattr__(self, name: str) -> Any: ...
sentinel: Any
sentinel: _Sentinel
DEFAULT: Any
_ArgsKwargs: TypeAlias = tuple[tuple[Any, ...], Mapping[str, Any]]
@@ -428,7 +428,7 @@ class _ANY:
def __ne__(self, other: object) -> Literal[False]: ...
__hash__: ClassVar[None] # type: ignore[assignment]
ANY: Any
ANY: _ANY
if sys.version_info >= (3, 10):
def create_autospec(
+6 -6
View File
@@ -5,12 +5,12 @@ from typing_extensions import TypeAlias
_T = TypeVar("_T")
_Mismatch: TypeAlias = tuple[_T, _T, int]
_MAX_LENGTH: Final[int]
_PLACEHOLDER_LEN: Final[int]
_MIN_BEGIN_LEN: Final[int]
_MIN_END_LEN: Final[int]
_MIN_COMMON_LEN: Final[int]
_MIN_DIFF_LEN: Final[int]
_MAX_LENGTH: Final = 80
_PLACEHOLDER_LEN: Final = 12
_MIN_BEGIN_LEN: Final = 5
_MIN_END_LEN: Final = 5
_MIN_COMMON_LEN: Final = 5
_MIN_DIFF_LEN: Final = 41
def _shorten(s: str, prefixlen: int, suffixlen: int) -> str: ...
def _common_shorten_repr(*args: str) -> tuple[str, ...]: ...