Skip to content

Commit

Permalink
Create classes without calling the __init__ method
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Hall committed Oct 25, 2024
1 parent 1cf7c37 commit bcb1d3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gramps/gen/lib/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@


def __object_hook(obj_dict):
obj = getattr(lib, obj_dict["_class"])()
cls = getattr(lib, obj_dict["_class"])
obj = cls.__new__(cls)
del obj_dict["_class"]
obj.set_object_state(obj_dict)
return obj
Expand Down

0 comments on commit bcb1d3a

Please sign in to comment.