File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
pandas-stubs/_libs/tslibs Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ from datetime import (
77 tzinfo as _tzinfo ,
88)
99from datetime import _IsoCalendarDate # pyright: ignore[reportPrivateUsage]
10+ import sys
1011from time import struct_time
1112from typing import (
1213 ClassVar ,
@@ -96,10 +97,15 @@ class Timestamp(datetime, SupportsIndex):
9697 def tz (self ) -> _tzinfo | None : ...
9798 @property
9899 def fold (self ) -> int : ...
99- @classmethod
100- def fromtimestamp ( # pyright: ignore[reportIncompatibleMethodOverride]
101- cls , t : float , tz : _tzinfo | str | None = ...
102- ) -> Self : ...
100+ if sys .version_info >= (3 , 12 ):
101+ @classmethod
102+ def fromtimestamp ( # pyright: ignore[reportIncompatibleMethodOverride]
103+ cls , t : float , tz : _tzinfo | str | None = ...
104+ ) -> Self : ...
105+ else :
106+ @classmethod
107+ def fromtimestamp (cls , t : float , tz : _tzinfo | str | None = ...) -> Self : ...
108+
103109 @classmethod
104110 def utcfromtimestamp (cls , ts : float ) -> Self : ...
105111 @classmethod
You can’t perform that action at this time.
0 commit comments