Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Adjust stubs to fix mypy lookup error due to circular dependencies in…
… stubs
  • Loading branch information
cdce8p authored and mypybot committed Apr 15, 2026
commit 46c81f51d87c40d935e43e547b6e993e33fc25ef
6 changes: 3 additions & 3 deletions mypy/typeshed/stdlib/time.pyi
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import sys
from _typeshed import structseq
from typing import Any, Final, Literal, Protocol, SupportsFloat, SupportsIndex, final, type_check_only
from typing import Any, Final, Literal, Protocol, SupportsFloat, SupportsIndex, Union, final, type_check_only
from typing_extensions import TypeAlias

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

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

altzone: int
daylight: int
Expand Down