Skip to content

Commit

Permalink
Format python.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanaya-mankad committed Jul 10, 2024
1 parent 0009701 commit 4616cb9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lattice/cpp/generate_support_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def generate_support_headers(namespace_name: str, root_data_groups: list[str], o
)


def generate_build_support(project_name: str, submodules:list, output_directory: Path):
def generate_build_support(project_name: str, submodules: list, output_directory: Path):
generated_file_name = "CMakeLists.txt"

project_cmake_file = Path(__file__).with_name("templates") / "project-cmake.txt.j2"
Expand Down
4 changes: 1 addition & 3 deletions lattice/cpp_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ def value(self):
class DependencyInitialization(ImplementationEntry):
def __init__(self, header_entry: InlineDependency, parent: ImplementationEntry = None):
super().__init__(None, parent)
self._func = (
f"void set_{header_entry.name} ({header_entry.type} value) {{ {header_entry.name} = value; }}"
)
self._func = f"void set_{header_entry.name} ({header_entry.type} value) {{ {header_entry.name} = value; }}"

@property
def value(self):
Expand Down
8 changes: 5 additions & 3 deletions lattice/header_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,11 @@ def __init__(self, name, parent, dependency_type):
@property
def value(self):
tab = "\t"
return (f"{self._level * tab}{self._type_specifier } {self.type} {self.name}{self._closure}"
"\n"
f"{self._level * tab}void set_{self.name}({self.type} value);")
return (
f"{self._level * tab}{self._type_specifier } {self.type} {self.name}{self._closure}"
"\n"
f"{self._level * tab}void set_{self.name}({self.type} value);"
)


# -------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 4616cb9

Please sign in to comment.