Skip to content

Commit

Permalink
Update display_mermaid_graph to match display_dot_graph including…
Browse files Browse the repository at this point in the history
… raw_output (mypy will not allow the function to return only None)
  • Loading branch information
kjgoodrick committed Jan 14, 2025
1 parent e24e1af commit 1b87720
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions py-polars/polars/_utils/various.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,15 @@ def display_dot_graph(


def display_mermaid_graph(
*, mermaid: str, show: bool = True, output_path: str | Path | None = None
) -> None:
*,
mermaid: str,
show: bool = True,
output_path: str | Path | None = None,
raw_output: bool = False,
) -> str | None:
if raw_output:
return mermaid

# Make font monospace
mermaid += r'%%{init: {"fontFamily": "monospace"}}%%' + "\n"

Expand Down

0 comments on commit 1b87720

Please sign in to comment.