mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Make datetime classmethods return correct type (#9706)
This commit is contained in:
@@ -272,7 +272,7 @@ class datetime(date):
|
||||
@classmethod
|
||||
def utcnow(cls) -> Self: ...
|
||||
@classmethod
|
||||
def combine(cls, date: _Date, time: _Time, tzinfo: _TzInfo | None = ...) -> datetime: ...
|
||||
def combine(cls, date: _Date, time: _Time, tzinfo: _TzInfo | None = ...) -> Self: ...
|
||||
def timestamp(self) -> float: ...
|
||||
def utctimetuple(self) -> struct_time: ...
|
||||
def date(self) -> _Date: ...
|
||||
@@ -298,7 +298,7 @@ class datetime(date):
|
||||
|
||||
def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ...
|
||||
@classmethod
|
||||
def strptime(cls, __date_string: str, __format: str) -> datetime: ...
|
||||
def strptime(cls, __date_string: str, __format: str) -> Self: ...
|
||||
def utcoffset(self) -> timedelta | None: ...
|
||||
def tzname(self) -> str | None: ...
|
||||
def dst(self) -> timedelta | None: ...
|
||||
|
||||
Reference in New Issue
Block a user