Made merge_with_skeleton "less complex"
continuous-integration/drone the build failed Details

pull/15/head
Jef Roosens 2021-04-26 18:14:04 +02:00
parent 8a7f47dfcd
commit 2d06c7feeb
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 4 additions and 3 deletions

View File

@ -93,9 +93,10 @@ def merge_with_skeleton(data: Dict, skel: Dict) -> Dict:
* Split info less complex functions * Split info less complex functions
""" """
# First, check for illegal keys # First, check for illegal keys
for key in data: key = next(key not in skel for key in data)
if key not in skel:
raise InvalidKeyError(key) if key:
raise InvalidKeyError(key)
# Then, check the default values # Then, check the default values
for key, value in skel.items(): for key, value in skel.items():