Skip to content

Commit

Permalink
🐛 Remove type validation from dict_merge
Browse files Browse the repository at this point in the history
Type validation is performed by pydantic
  • Loading branch information
hexfaker committed Jun 11, 2022
1 parent 474462f commit ac81883
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions doh/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ def dict_merge(*args, add_keys=True):
for k, v in merge_dct.items():
if not rtn_dct.get(k):
rtn_dct[k] = v
elif k in rtn_dct and type(v) != type(rtn_dct[k]):
raise TypeError(
f"Overlapping keys exist with different types: original is {type(rtn_dct[k])}, new value is {type(v)}"
)
elif isinstance(rtn_dct[k], dict) and isinstance(
merge_dct[k], collections.abc.Mapping
):
Expand Down

0 comments on commit ac81883

Please sign in to comment.