Skip to content

Commit 3fcf88e

Browse files
DimitriPapadopoulosastanin
authored andcommitted
Use is to compare types
This is consistent with other similar checks in the code base.
1 parent 0dc72a9 commit 3fcf88e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

tabulate/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,11 @@ def _is_separating_line_value(value):
124124

125125
def _is_separating_line(row):
126126
row_type = type(row)
127-
is_sl = (row_type == list or row_type == str) and (
127+
return (row_type is list or row_type is str) and (
128128
(len(row) >= 1 and _is_separating_line_value(row[0]))
129129
or (len(row) >= 2 and _is_separating_line_value(row[1]))
130130
)
131131

132-
return is_sl
133-
134132

135133
def _pipe_segment_with_colons(align, colwidth):
136134
"""Return a segment of a horizontal line with optional colons which

0 commit comments

Comments
 (0)