Use Final for unittest constants (#12447)

This commit is contained in:
Max Muoto authored and GitHub committed 2024-07-28 12:03:02 +02:00
1 parent 0ffa2c5597
commit b40eb642e0
5 files changed
+30 -17

No files matched your search

+15 -2
View File
@@ -6,7 +6,20 @@ from collections.abc import Callable, Container, Iterable, Mapping, Sequence, Se
from contextlib import AbstractContextManager
from re import Pattern
from types import TracebackType
from typing import Any, AnyStr, ClassVar, Generic, NamedTuple, NoReturn, Protocol, SupportsAbs, SupportsRound, TypeVar, overload
from typing import (
Any,
AnyStr,
ClassVar,
Final,
Generic,
NamedTuple,
NoReturn,
Protocol,
SupportsAbs,
SupportsRound,
TypeVar,
overload,
)
from typing_extensions import ParamSpec, Self, TypeAlias
from warnings import WarningMessage
@@ -22,7 +35,7 @@ _E = TypeVar("_E", bound=BaseException)
_FT = TypeVar("_FT", bound=Callable[..., Any])
_P = ParamSpec("_P")
DIFF_OMITTED: str
DIFF_OMITTED: Final[str]
class _BaseTestCaseContext:
test_case: TestCase