Skip to content

Commit

Permalink
refactor(camtools/render.py): enforce type hints for font_type and …
Browse files Browse the repository at this point in the history
…`multiline_alignment` parameters using Literal to improve type safety and clarity
  • Loading branch information
yxlao committed Jan 10, 2025
1 parent 05cb604 commit e82a15a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions camtools/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,9 @@ def render_text(
def render_texts(
texts: List[str],
font_size: int = 72,
font_type: str = "tex",
font_type: Literal["tex", "serif", "sans", "mono"] = "tex",
font_color: Tuple[float, float, float] = (0.0, 0.0, 0.0),
multiline_alignment: str = "center",
multiline_alignment: Literal["left", "center", "right"] = "center",
same_height: bool = False,
same_width: bool = False,
padding_tblr: Tuple[int, int, int, int] = (0, 0, 0, 0),
Expand Down

0 comments on commit e82a15a

Please sign in to comment.