Skip to content

Commit a48499c

Browse files
Use is to compare types
This is consistent with other similar checks in the code base.
1 parent 1c7bbd8 commit a48499c

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
@@ -126,13 +126,11 @@ def _is_separating_line_value(value):
126126

127127
def _is_separating_line(row):
128128
row_type = type(row)
129-
is_sl = (row_type == list or row_type == str) and (
129+
return (row_type is list or row_type is str) and (
130130
(len(row) >= 1 and _is_separating_line_value(row[0]))
131131
or (len(row) >= 2 and _is_separating_line_value(row[1]))
132132
)
133133

134-
return is_sl
135-
136134

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

0 commit comments

Comments
 (0)