Skip to content

Commit

Permalink
Black formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanaya-mankad committed Oct 4, 2024
1 parent 5fb7479 commit fdce7f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions lattice/cpp_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]:
Expand Down
3 changes: 1 addition & 2 deletions lattice/header_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]

0 comments on commit fdce7f7

Please sign in to comment.