Skip to content

Commit

Permalink
docs: annotate functions used by comma website and shop (#1342)
Browse files Browse the repository at this point in the history
and that's why you always leave a note
  • Loading branch information
jyoung8607 authored Oct 4, 2024
1 parent 9bf735b commit a88fe78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opendbc/car/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def build_sorted_car_docs_list(platforms, footnotes=None, include_dashcam=False,
return sorted_cars


# CAUTION: This function is imported by shop.comma.ai and comma.ai/vehicles, test changes carefully
def get_all_car_docs() -> list[CarDocs]:
collected_footnotes = get_all_footnotes()
sorted_list: list[CarDocs] = build_sorted_car_docs_list(PLATFORMS, footnotes=collected_footnotes)
Expand All @@ -80,6 +81,7 @@ def group_by_make(all_car_docs: list[CarDocs]) -> dict[str, list[CarDocs]]:
return dict(sorted_car_docs)


# CAUTION: This function is imported by shop.comma.ai and comma.ai/vehicles, test changes carefully
def generate_cars_md(all_car_docs: list[CarDocs], template_fn: str) -> str:
with open(template_fn) as f:
template = jinja2.Template(f.read(), trim_blocks=True, lstrip_blocks=True)
Expand Down

0 comments on commit a88fe78

Please sign in to comment.