Skip to content

Commit 1e3d413

Browse files
committed
Adjust stubs to fix mypy lookup error due to circular dependencies in stubs
1 parent 48d4484 commit 1e3d413

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mypy/typeshed/stdlib/time.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import sys
22
from _typeshed import structseq
3-
from typing import Any, Final, Literal, Protocol, SupportsFloat, SupportsIndex, final, type_check_only
3+
from typing import Any, Final, Literal, Protocol, SupportsFloat, SupportsIndex, Union, final, type_check_only
44
from typing_extensions import TypeAlias
55

66
_TimeTuple: TypeAlias = tuple[int, int, int, int, int, int, int, int, int]
77

88
if sys.version_info >= (3, 15):
99
# anticipate on https://github.com/python/cpython/pull/139224
10-
_SupportsFloatOrIndex: TypeAlias = SupportsFloat | SupportsIndex
10+
_SupportsFloatOrIndex: TypeAlias = Union[SupportsFloat, SupportsIndex]
1111
else:
1212
# before, time functions only accept (subclass of) float, *not* SupportsFloat
13-
_SupportsFloatOrIndex: TypeAlias = float | SupportsIndex
13+
_SupportsFloatOrIndex: TypeAlias = Union[float, SupportsIndex]
1414

1515
altzone: int
1616
daylight: int

0 commit comments

Comments
 (0)