Skip to content

Commit

Permalink
catches a tiny bug
Browse files Browse the repository at this point in the history
  • Loading branch information
johentsch committed Nov 24, 2023
1 parent 2d3d343 commit 557a4d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ms3/utils/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,10 @@ def dataframe2markdown(
return writer


def dict2oneliner(d):
def dict2oneliner(d: dict) -> str:
"""Turns a dictionary into a single-line string without brackets."""
if pd.isnull(d) or isinstance(d, str):
return d
return ", ".join(f"{k}: {v}" for k, v in d.items())


Expand Down

0 comments on commit 557a4d5

Please sign in to comment.