Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/easyscience/Objects/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class ComponentSerializer:

_CORE = True

def __deepcopy__(self, memo):
return self.from_dict(self.as_dict())

def encode(self, skip: Optional[List[str]] = None, encoder: Optional[EC] = None, **kwargs) -> Any:
"""
Use an encoder to covert an EasyScience object into another format. Default is to a dictionary using `DictSerializer`.
Expand All @@ -41,7 +44,6 @@ def encode(self, skip: Optional[List[str]] = None, encoder: Optional[EC] = None,
:param kwargs: Any additional key word arguments to be passed to the encoder
:return: encoded object containing all information to reform an EasyScience object.
"""

if encoder is None:
encoder = DictSerializer
encoder_obj = encoder()
Expand Down
Loading