diff --git a/stdlib/cmath.pyi b/stdlib/cmath.pyi index fab9d10230f8..a08addcf5438 100644 --- a/stdlib/cmath.pyi +++ b/stdlib/cmath.pyi @@ -1,13 +1,13 @@ -from typing import SupportsComplex, SupportsFloat, SupportsIndex +from typing import Final, SupportsComplex, SupportsFloat, SupportsIndex from typing_extensions import TypeAlias -e: float -pi: float -inf: float -infj: complex -nan: float -nanj: complex -tau: float +e: Final[float] +pi: Final[float] +inf: Final[float] +infj: Final[complex] +nan: Final[float] +nanj: Final[complex] +tau: Final[float] _C: TypeAlias = SupportsFloat | SupportsComplex | SupportsIndex | complex diff --git a/stdlib/math.pyi b/stdlib/math.pyi index 2bb61e0669b4..86f71f27580a 100644 --- a/stdlib/math.pyi +++ b/stdlib/math.pyi @@ -1,6 +1,6 @@ import sys from collections.abc import Iterable -from typing import Protocol, SupportsFloat, SupportsIndex, TypeVar, overload +from typing import Final, Protocol, SupportsFloat, SupportsIndex, TypeVar, overload from typing_extensions import TypeAlias _T = TypeVar("_T") @@ -8,11 +8,11 @@ _T_co = TypeVar("_T_co", covariant=True) _SupportsFloatOrIndex: TypeAlias = SupportsFloat | SupportsIndex -e: float -pi: float -inf: float -nan: float -tau: float +e: Final[float] +pi: Final[float] +inf: Final[float] +nan: Final[float] +tau: Final[float] def acos(x: _SupportsFloatOrIndex, /) -> float: ... def acosh(x: _SupportsFloatOrIndex, /) -> float: ...