Skip to content

Commit

Permalink
🐛 (mixins) Fix overwrite of extra data
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwoerpel committed Jun 12, 2024
1 parent 62d7a55 commit 415a8c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anystore/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class JsonMixin:

@classmethod
def from_json_str(cls, data: str, **kwargs) -> Self:
loaded = clean_dict({**orjson.loads(data), **kwargs})
loaded = clean_dict({**orjson.loads(data), **clean_dict(kwargs)})
return cls(**loaded)

@classmethod
Expand All @@ -46,7 +46,7 @@ class YamlMixin:

@classmethod
def from_yaml_str(cls, data: str, **kwargs) -> Self:
loaded = clean_dict({**yaml.safe_load(data), **kwargs})
loaded = clean_dict({**yaml.safe_load(data), **clean_dict(kwargs)})
return cls(**loaded)

@classmethod
Expand Down

0 comments on commit 415a8c2

Please sign in to comment.