Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikboeck committed Jun 29, 2024
1 parent 53b75cc commit 8af690d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parasite/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,16 +386,16 @@ def merge(self, other: Object) -> Object:
if key in self._m_items:
# if both src and dest are objects, merge them
if isinstance(value, Object) and isinstance(self._m_items[key], Object):
self._m_items[key].merge(value)
self._m_items[key].merge(value) # type: ignore

# if both src and dest are arrays, merge them
elif isinstance(value, Variant) and isinstance(self._m_items[key], Variant):
for variant in value._m_variants:
self._m_items[key].add_variant(variant)
self._m_items[key].add_variant(variant) # type: ignore

# if dest is already a variant, add the value to it
elif isinstance(self._m_items[key], Variant):
self._m_items[key].add_variant(value)
self._m_items[key].add_variant(value) # type: ignore

# else, create a new variant and add both values
else:
Expand Down

0 comments on commit 8af690d

Please sign in to comment.