Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
glevco committed Oct 27, 2023
1 parent 5ff52ee commit 0441334
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hathor/utils/named_tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def validated_named_tuple_from_dict(

# This intermediate step shouldn't be necessary, but for some reason pydantic.create_model_from_namedtuple
# doesn't support default attribute values, so we do this to add them
all_attributes = named_tuple_type.__call__(**attributes_dict)
all_attributes = named_tuple_type(**attributes_dict) # type: ignore[call-overload]
validated_attributes = model(**all_attributes._asdict())
validated_attributes_dict = {k: v for k, v in validated_attributes}

return named_tuple_type.__call__(**validated_attributes_dict)
return named_tuple_type(**validated_attributes_dict) # type: ignore[call-overload]

0 comments on commit 0441334

Please sign in to comment.