diff --git a/lattice/cpp_entries.py b/lattice/cpp_entries.py index 1aef6f0..c4c0f9e 100644 --- a/lattice/cpp_entries.py +++ b/lattice/cpp_entries.py @@ -327,9 +327,11 @@ def _get_items_to_serialize(self, header_tree): # Shortcut to avoid creating "from_json" entries for the main class, but create them # for all other classes. The main class relies on an "Initialize" function instead, # dealt-with in the next block with function overrides. - if (isinstance(entry, Struct) and - entry.name not in self._namespace._name and - len([c for c in entry.child_entries if isinstance(c, DataElement)])): + if ( + isinstance(entry, Struct) + and entry.name not in self._namespace._name + and len([c for c in entry.child_entries if isinstance(c, DataElement)]) + ): # Create the "from_json" function definition (header), only if it won't be empty s = StructSerialization(entry.name, self._namespace) for data_element_entry in [c for c in entry.child_entries if isinstance(c, DataElement)]: diff --git a/lattice/header_entries.py b/lattice/header_entries.py index c70e816..9a4c080 100644 --- a/lattice/header_entries.py +++ b/lattice/header_entries.py @@ -711,7 +711,7 @@ def _add_member_includes(self, dependency: str, generated_base_class_path: Optio if header_include not in self._preamble: self._preamble.append(header_include) if generated_base_class_path: - #self._required_base_classes.append(dependency) + # self._required_base_classes.append(dependency) support.generate_superclass_header(dependency, generated_base_class_path) # fmt: off @@ -797,4 +797,3 @@ def _list_objects_of_type(self, object_type_or_list: list | str) -> list: return [tag for tag in self._contents if self._contents[tag].get("Object Type") == object_type_or_list] elif isinstance(object_type_or_list, list): return [tag for tag in self._contents if self._contents[tag].get("Object Type") in object_type_or_list] -