summaryrefslogtreecommitdiff
path: root/kvmd/tools.py
diff options
context:
space:
mode:
authorAdam Outler <[email protected]>2023-06-19 22:35:53 -0400
committerGitHub <[email protected]>2023-06-20 05:35:53 +0300
commitdb3f6220238da8138c670924a074477987790fbe (patch)
tree66a086a240d6f44485e9dc460dbc1fe5b326dbf5 /kvmd/tools.py
parent9879a9f05b07d329b8db140e58d78f6005b2d76a (diff)
Refactoring merge Method into a New Class & Adding Unit Tests (#137)
Diffstat (limited to 'kvmd/tools.py')
-rw-r--r--kvmd/tools.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/kvmd/tools.py b/kvmd/tools.py
index 773fcb5a..1c03f8ce 100644
--- a/kvmd/tools.py
+++ b/kvmd/tools.py
@@ -45,15 +45,6 @@ def efmt(err: Exception) -> str:
# =====
-def merge(dest: dict, src: dict) -> None:
- for key in src:
- if key in dest:
- if isinstance(dest[key], dict) and isinstance(src[key], dict):
- merge(dest[key], src[key])
- continue
- dest[key] = src[key]
-
-
def rget(dct: dict, *keys: Hashable) -> dict:
result = functools.reduce((lambda nxt, key: nxt.get(key, {})), keys, dct)
if not isinstance(result, dict):