Skip to content

Commit

Permalink
Use keyword-only arguments in encode_*() functions
Browse files Browse the repository at this point in the history
These functions have grown a number of arguments that I think only make
sense if the calling context includes their keyword name.
  • Loading branch information
jparise committed Feb 4, 2024
1 parent 71f63af commit cf6c624
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vesta/chars.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def encode(s: str) -> Row:

def encode_row(
s: str,
*,
align: Literal["left", "center", "right"] = "left",
fill: int = Color.BLANK,
) -> Row:
Expand Down Expand Up @@ -156,6 +157,7 @@ def encode_row(

def encode_text(
s: str,
*,
align: Literal["left", "center", "right"] = "left",
valign: Optional[Literal["top", "middle", "bottom"]] = "top",
max_rows: int = ROWS,
Expand Down

0 comments on commit cf6c624

Please sign in to comment.