Skip to content

Commit 557a4d5

Browse files
author
Johannes Hentschel
committed
catches a tiny bug
1 parent 2d3d343 commit 557a4d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ms3/utils/functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,10 @@ def dataframe2markdown(
889889
return writer
890890

891891

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

896898

0 commit comments

Comments
 (0)