Closed
Description
from datetime import datetime
from typing_extensions import assert_type
class MyDT(datetime):
pass
my_dt = MyDT.utcnow()
assert_type(my_dt, MyDT)
assert type(my_dt) == MyDT
this type checks, but blows up at runtime. Tested with python 3.11.
EDIT: this issue originally claimed that now()
was also incorrectly typed, but it seems that was not correct.
Metadata
Metadata
Assignees
Labels
No labels