Skip to content

Commit

Permalink
Reformat.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanaya-mankad committed Jul 12, 2024
1 parent f3f7f7d commit 05f551b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lattice/cpp/support_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
from pathlib import Path
from lattice.header_entries import InitializeFunction, Struct


def support_header_pathnames(output_directory: Path):
"""Return a list of the template-generated header file names."""
return [
output_directory / "-".join(snake_style(template.stem).split("_"))
for template in Path(__file__).with_name("templates").iterdir() if ".h" in template.suffixes
for template in Path(__file__).with_name("templates").iterdir()
if ".h" in template.suffixes
]


def render_support_headers(namespace_name: str, output_directory: Path):
"""Generate the project-specific helper headers."""
for template in Path(__file__).with_name("templates").iterdir():
Expand All @@ -24,6 +27,7 @@ def render_support_headers(namespace_name: str, output_directory: Path):
Path(output_directory) / generated_file_name,
)


def render_build_files(project_name: str, submodules: list, output_directory: Path):
"""Generate the project-specific CMakeLists files."""
generated_file_name = "CMakeLists.txt"
Expand Down Expand Up @@ -52,6 +56,7 @@ def render_build_files(project_name: str, submodules: list, output_directory: Pa
Path(output_directory) / "vendor" / generated_file_name,
)


def generate_superclass_header(superclass: str, output_directory: Path):
s1 = f"#ifndef {superclass.upper()}_H_"
s2 = f"#define {superclass.upper()}_H_"
Expand Down
1 change: 1 addition & 0 deletions lattice/header_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Optional
import pathlib


def remove_prefix(text, prefix):
return text[len(prefix) :] if text.startswith(prefix) else text

Expand Down

0 comments on commit 05f551b

Please sign in to comment.