From 13be8bb8d8e77eca76466aaa066d0cdd95040517 Mon Sep 17 00:00:00 2001 From: Jonathan Gangi Date: Tue, 24 Sep 2024 16:00:07 -0300 Subject: [PATCH] Improve `dict_merge` from utils module Improve `dict_merge` from utils module --- starmap_client/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/starmap_client/utils.py b/starmap_client/utils.py index a0dbc88..a6f575a 100644 --- a/starmap_client/utils.py +++ b/starmap_client/utils.py @@ -18,8 +18,6 @@ def dict_merge(a: Dict[str, Any], b: Dict[str, Any]) -> Dict[str, Any]: Returns: dict: A new dictionary with combination of A and B. """ - c = {} for x in [a, b]: assert_is_dict(x) - c.update(x) - return c + return a | b