Skip to content

Commit c9c521f

Browse files
committed
disallow (undocumented) shortcuts for alignments
1 parent aa0bc2b commit c9c521f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tabulate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,10 @@ def _align_column(strings, alignment, minwidth=0, has_invisible=True):
357357
if alignment == "right":
358358
strings = [s.strip() for s in strings]
359359
padfn = _padleft
360-
elif alignment in "center":
360+
elif alignment == "center":
361361
strings = [s.strip() for s in strings]
362362
padfn = _padboth
363-
elif alignment in "decimal":
363+
elif alignment == "decimal":
364364
decimals = [_afterpoint(s) for s in strings]
365365
maxdecimals = max(decimals)
366366
strings = [s + (maxdecimals - decs) * " "

0 commit comments

Comments
 (0)