mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Mark (c)math constants as final (#13410)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user