Make datetime classmethods return correct type (#9706)

This commit is contained in:
PythonCoderAS
2023-02-10 10:53:17 -05:00
committed by GitHub
parent 39487a8bab
commit 52cf716831

View File

@@ -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: ...