@@ -37,14 +37,17 @@ class date:
3737 def __init__ (self , year : int , month : int , day : int ) -> None : ...
3838
3939 @classmethod
40- def fromtimestamp (cls , t : float ) -> date : ...
40+ def fromtimestamp (cls : Type [ _S ] , t : float ) -> _S : ...
4141 @classmethod
42- def today (cls ) -> date : ...
42+ def today (cls : Type [ _S ] ) -> _S : ...
4343 @classmethod
44- def fromordinal (cls , n : int ) -> date : ...
44+ def fromordinal (cls : Type [ _S ] , n : int ) -> _S : ...
4545 if sys .version_info >= (3 , 7 ):
4646 @classmethod
47- def fromisoformat (cls , date_string : str ) -> date : ...
47+ def fromisoformat (cls : Type [_S ], date_string : str ) -> _S : ...
48+ if sys .version_info >= (3 , 8 ):
49+ @classmethod
50+ def fromisocalendar (cls : Type [_S ], year : int , week : int , day : int ) -> _S : ...
4851
4952 @property
5053 def year (self ) -> int : ...
@@ -114,7 +117,7 @@ class time:
114117 def isoformat (self ) -> str : ...
115118 if sys .version_info >= (3 , 7 ):
116119 @classmethod
117- def fromisoformat (cls , time_string : str ) -> time : ...
120+ def fromisoformat (cls : Type [ _S ] , time_string : str ) -> _S : ...
118121 def strftime (self , fmt : _Text ) -> str : ...
119122 if sys .version_info >= (3 ,):
120123 def __format__ (self , fmt : str ) -> str : ...
@@ -222,13 +225,13 @@ class datetime(date):
222225 def fold (self ) -> int : ...
223226
224227 @classmethod
225- def fromtimestamp (cls , t : float , tz : Optional [_tzinfo ] = ...) -> datetime : ...
228+ def fromtimestamp (cls : Type [ _S ] , t : float , tz : Optional [_tzinfo ] = ...) -> _S : ...
226229 @classmethod
227- def utcfromtimestamp (cls , t : float ) -> datetime : ...
230+ def utcfromtimestamp (cls : Type [ _S ] , t : float ) -> _S : ...
228231 @classmethod
229- def today (cls ) -> datetime : ...
232+ def today (cls : Type [ _S ] ) -> _S : ...
230233 @classmethod
231- def fromordinal (cls , n : int ) -> datetime : ...
234+ def fromordinal (cls : Type [ _S ] , n : int ) -> _S : ...
232235 if sys .version_info >= (3 , 8 ):
233236 @classmethod
234237 def now (cls : Type [_S ], tz : Optional [_tzinfo ] = ...) -> _S : ...
@@ -240,7 +243,7 @@ class datetime(date):
240243 @classmethod
241244 def now (cls , tz : _tzinfo ) -> datetime : ...
242245 @classmethod
243- def utcnow (cls ) -> datetime : ...
246+ def utcnow (cls : Type [ _S ] ) -> _S : ...
244247 if sys .version_info >= (3 , 6 ):
245248 @classmethod
246249 def combine (cls , date : _date , time : _time , tzinfo : Optional [_tzinfo ] = ...) -> datetime : ...
@@ -249,7 +252,7 @@ class datetime(date):
249252 def combine (cls , date : _date , time : _time ) -> datetime : ...
250253 if sys .version_info >= (3 , 7 ):
251254 @classmethod
252- def fromisoformat (cls , date_string : str ) -> datetime : ...
255+ def fromisoformat (cls : Type [ _S ] , date_string : str ) -> _S : ...
253256 def strftime (self , fmt : _Text ) -> str : ...
254257 if sys .version_info >= (3 ,):
255258 def __format__ (self , fmt : str ) -> str : ...
0 commit comments