Skip to content

Commit

Permalink
Merge pull request #293 from DimitriPapadopoulos/codespell
Browse files Browse the repository at this point in the history
Fix typos found by codespell
  • Loading branch information
astanin authored Sep 27, 2024
2 parents bbc5ff1 + ca385d2 commit cecb08e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tabulate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2648,7 +2648,7 @@ def _update_lines(self, lines, new_line):
else: # A single reset code resets everything
self._active_codes = []

# Always ensure each line is color terminted if any colors are
# Always ensure each line is color terminated if any colors are
# still active, otherwise colors will bleed into other cells on the console
if len(self._active_codes) > 0:
new_line = new_line + _ansi_color_reset_code
Expand Down
6 changes: 3 additions & 3 deletions test/test_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def test_iterable_of_iterables():
"Input: an interable of iterables."
"Input: an iterable of iterables."
ii = iter(map(lambda x: iter(x), [range(5), range(5, 0, -1)]))
expected = "\n".join(
["- - - - -", "0 1 2 3 4", "5 4 3 2 1", "- - - - -"]
Expand All @@ -21,7 +21,7 @@ def test_iterable_of_iterables():


def test_iterable_of_iterables_headers():
"Input: an interable of iterables with headers."
"Input: an iterable of iterables with headers."
ii = iter(map(lambda x: iter(x), [range(5), range(5, 0, -1)]))
expected = "\n".join(
[
Expand All @@ -36,7 +36,7 @@ def test_iterable_of_iterables_headers():


def test_iterable_of_iterables_firstrow():
"Input: an interable of iterables with the first row as headers"
"Input: an iterable of iterables with the first row as headers"
ii = iter(map(lambda x: iter(x), ["abcde", range(5), range(5, 0, -1)]))
expected = "\n".join(
[
Expand Down
13 changes: 11 additions & 2 deletions test/test_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ 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 @@ -244,7 +246,14 @@ 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
1 change: 1 addition & 0 deletions test/test_output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test output of the various forms of tabular data."""

from pytest import mark

from common import assert_equal, raises, skip, check_warnings
Expand Down
1 change: 1 addition & 0 deletions test/test_textwrapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Discretely test functionality of our custom TextWrapper"""

import datetime

from tabulate import _CustomTextWrap as CTW, tabulate, _strip_ansi
Expand Down

0 comments on commit cecb08e

Please sign in to comment.