-
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Example Code:
from datetime import datetime
from typing import Callable, Union
from pedantic import frozen_dataclass
@frozen_dataclass
class DatetimeCallable:
dt: datetime | Callable[[], datetime]
if __name__ == '__main__':
x = DatetimeCallable(
dt=datetime(year=2022, month=1, day=1),
).validate_types()
Exception:
TypeError: datetime.datetime(2022, 1, 1, 0, 0) is not a callable object
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working