def timedelta_constructor(loader: Loader, node: Node) -> Optional[timedelta]:
    value = loader.construct_scalar(node)
    data = parse_timedelta(value)
    return data
Esempio n. 2
0
def time_constructor(loader: Loader, node: Node) -> time:
    value = loader.construct_scalar(node)
    data = time.fromisoformat(value)
    return data