From 0522ce83f0485eb3522c342aea753a7c975afb88 Mon Sep 17 00:00:00 2001 From: acoleman2000 Date: Tue, 17 Jan 2023 10:54:51 -0700 Subject: [PATCH] removing typecheck for key in val --- schema_salad/python_codegen_support.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/schema_salad/python_codegen_support.py b/schema_salad/python_codegen_support.py index 13d4d85f..558b75b4 100644 --- a/schema_salad/python_codegen_support.py +++ b/schema_salad/python_codegen_support.py @@ -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