Skip to content

Commit c79688d

Browse files
committed
Fix a silly mistake in type hint
1 parent 4528455 commit c79688d

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ _proc/
55
.gitattributes
66
.last_checked
77
.gitconfig
8+
.cursorignore
89
*.bak
910
*.log
1011
*~

dabest/plot_tools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def single_sankey(
356356
strip_on: bool = True, # if True, draw strip for each group comparison
357357
one_sankey: bool = False, # if True, only draw one sankey diagram
358358
right_color: bool = False, # if True, each strip of the diagram will be colored according to the corresponding left labels
359-
align: bool = "center", # if 'center', the diagram will be centered on each xtick, if 'edge', the diagram will be aligned with the left edge of each xtick
359+
align: str = "center", # if 'center', the diagram will be centered on each xtick, if 'edge', the diagram will be aligned with the left edge of each xtick
360360
):
361361
"""
362362
Make a single Sankey diagram showing proportion flow from left to right
@@ -437,6 +437,7 @@ def single_sankey(
437437
if align not in ("center", "edge"):
438438
err = "{} assigned for `align` is not valid.".format(align)
439439
raise ValueError(err)
440+
440441
if align == "center":
441442
try:
442443
leftpos = xpos - width / 2

nbs/API/plot_tools.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@
409409
" strip_on: bool = True, # if True, draw strip for each group comparison\n",
410410
" one_sankey: bool = False, # if True, only draw one sankey diagram\n",
411411
" right_color: bool = False, # if True, each strip of the diagram will be colored according to the corresponding left labels\n",
412-
" align: bool = \"center\", # if 'center', the diagram will be centered on each xtick, if 'edge', the diagram will be aligned with the left edge of each xtick\n",
412+
" align: str = \"center\", # if 'center', the diagram will be centered on each xtick, if 'edge', the diagram will be aligned with the left edge of each xtick\n",
413413
"):\n",
414414
" \"\"\"\n",
415415
" Make a single Sankey diagram showing proportion flow from left to right\n",
@@ -490,6 +490,7 @@
490490
" if align not in (\"center\", \"edge\"):\n",
491491
" err = \"{} assigned for `align` is not valid.\".format(align)\n",
492492
" raise ValueError(err)\n",
493+
" \n",
493494
" if align == \"center\":\n",
494495
" try:\n",
495496
" leftpos = xpos - width / 2\n",

0 commit comments

Comments
 (0)