Skip to content

Commit

Permalink
fix E721 warning in tabulate/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
astanin committed Sep 26, 2024
1 parent 968f258 commit 4e97640
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tabulate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def _is_file(f):


def _is_separating_line_value(value):
return type(value) == str and value.strip() == SEPARATING_LINE
return type(value) is str and value.strip() == SEPARATING_LINE


def _is_separating_line(row):
Expand Down
13 changes: 2 additions & 11 deletions test/test_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ def test_wrap_text_wide_chars():
except ImportError:
skip("test_wrap_text_wide_chars is skipped")

rows = [
["청자청자청자청자청자", "약간 감싸면 더 잘 보일 수있는 다소 긴 설명입니다"]
]
rows = [["청자청자청자청자청자", "약간 감싸면 더 잘 보일 수있는 다소 긴 설명입니다"]]
widths = [5, 20]
expected = [
[
Expand Down Expand Up @@ -246,14 +244,7 @@ def test_wrap_text_to_colwidths_colors_wide_char():
except ImportError:
skip("test_wrap_text_to_colwidths_colors_wide_char is skipped")

data = [
[
(
"\033[31m약간 감싸면 더 잘 보일 수있는 다소 긴"
" 설명입니다 설명입니다 설명입니다 설명입니다 설명\033[0m"
)
]
]
data = [[("\033[31m약간 감싸면 더 잘 보일 수있는 다소 긴" " 설명입니다 설명입니다 설명입니다 설명입니다 설명\033[0m")]]
result = T._wrap_text_to_colwidths(data, [30])

expected = [
Expand Down

0 comments on commit 4e97640

Please sign in to comment.