Skip to content

Commit

Permalink
removing typecheck for key in val
Browse files Browse the repository at this point in the history
  • Loading branch information
acoleman2000 committed Jan 17, 2023
1 parent 16996bb commit 0522ce8
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions schema_salad/python_codegen_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,17 +316,11 @@ def save(
newdict = CommentedMap()
for key in val:
if doc:
if isinstance(key, (int, float, bool, str)):
if key in doc:
newdict.lc.add_kv_line_col(key, doc.lc.data[key])
newdict[key] = save(
val[key], top=False, base_url=base_url, relative_uris=relative_uris, doc=doc.get(key)
)
else:
newdict[key] = save(
val[key], top=False, base_url=base_url, relative_uris=relative_uris, doc=doc
)

if key in doc:
newdict.lc.add_kv_line_col(key, doc.lc.data[key])
newdict[key] = save(
val[key], top=False, base_url=base_url, relative_uris=relative_uris, doc=doc.get(key)
)
else:
newdict[key] = save(
val[key], top=False, base_url=base_url, relative_uris=relative_uris, doc=doc
Expand Down

0 comments on commit 0522ce8

Please sign in to comment.