@@ -5,7 +5,6 @@ from datetime import (
5
5
timedelta ,
6
6
tzinfo as _tzinfo ,
7
7
)
8
- import sys
9
8
from time import struct_time
10
9
from typing import (
11
10
ClassVar ,
@@ -89,16 +88,8 @@ class Timestamp(datetime):
89
88
def today (cls : Type [_S ]) -> _S : ...
90
89
@classmethod
91
90
def fromordinal (cls : Type [_S ], n : int ) -> _S : ...
92
- if sys .version_info >= (3 , 8 ):
93
- @classmethod
94
- def now (cls : Type [_S ], tz : _tzinfo | str | None = ...) -> _S : ...
95
- else :
96
- @overload
97
- @classmethod
98
- def now (cls : Type [_S ], tz : None = ...) -> _S : ...
99
- @overload
100
- @classmethod
101
- def now (cls , tz : _tzinfo ) -> datetime : ...
91
+ @classmethod
92
+ def now (cls : Type [_S ], tz : _tzinfo | str | None = ...) -> _S : ...
102
93
@classmethod
103
94
def utcnow (cls : Type [_S ]) -> _S : ...
104
95
@classmethod
@@ -129,10 +120,7 @@ class Timestamp(datetime):
129
120
* ,
130
121
fold : int = ...,
131
122
) -> datetime : ...
132
- if sys .version_info >= (3 , 8 ):
133
- def astimezone (self : _S , tz : _tzinfo | None = ...) -> _S : ...
134
- else :
135
- def astimezone (self , tz : _tzinfo | None = ...) -> datetime : ...
123
+ def astimezone (self : _S , tz : _tzinfo | None = ...) -> _S : ...
136
124
def ctime (self ) -> str : ...
137
125
def isoformat (self , sep : str = ..., timespec : str = ...) -> str : ...
138
126
@classmethod
@@ -144,12 +132,8 @@ class Timestamp(datetime):
144
132
def __lt__ (self , other : datetime ) -> bool : ... # type: ignore
145
133
def __ge__ (self , other : datetime ) -> bool : ... # type: ignore
146
134
def __gt__ (self , other : datetime ) -> bool : ... # type: ignore
147
- if sys .version_info >= (3 , 8 ):
148
- def __add__ (self : _S , other : timedelta ) -> _S : ...
149
- def __radd__ (self : _S , other : timedelta ) -> _S : ...
150
- else :
151
- def __add__ (self , other : timedelta ) -> datetime : ...
152
- def __radd__ (self , other : timedelta ) -> datetime : ...
135
+ def __add__ (self : _S , other : timedelta ) -> _S : ...
136
+ def __radd__ (self : _S , other : timedelta ) -> _S : ...
153
137
@overload # type: ignore
154
138
def __sub__ (self , other : datetime ) -> timedelta : ...
155
139
@overload
0 commit comments