mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Add strptime for datetime.time and datetime.date (3.14) (#13991)
This commit is contained in:
@@ -364,8 +364,6 @@ dataclasses.Field.__init__
|
||||
dataclasses.Field.doc
|
||||
dataclasses.field
|
||||
dataclasses.make_dataclass
|
||||
datetime.date.strptime
|
||||
datetime.time.strptime
|
||||
decimal.Decimal.from_number
|
||||
decimal.DecimalTuple.__annotate_func__
|
||||
decimal.DecimalTuple.__annotations_cache__
|
||||
|
||||
@@ -73,6 +73,11 @@ class date:
|
||||
@property
|
||||
def day(self) -> int: ...
|
||||
def ctime(self) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
@classmethod
|
||||
def strptime(cls, date_string: str, format: str, /) -> Self: ...
|
||||
|
||||
# On <3.12, the name of the parameter in the pure-Python implementation
|
||||
# didn't match the name in the C implementation,
|
||||
# meaning it is only *safe* to pass it as a keyword argument on 3.12+
|
||||
@@ -142,6 +147,11 @@ class time:
|
||||
def isoformat(self, timespec: str = ...) -> str: ...
|
||||
@classmethod
|
||||
def fromisoformat(cls, time_string: str, /) -> Self: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
@classmethod
|
||||
def strptime(cls, date_string: str, format: str, /) -> Self: ...
|
||||
|
||||
# On <3.12, the name of the parameter in the pure-Python implementation
|
||||
# didn't match the name in the C implementation,
|
||||
# meaning it is only *safe* to pass it as a keyword argument on 3.12+
|
||||
|
||||
Reference in New Issue
Block a user