Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos found by codespell #293

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tabulate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2647,7 +2647,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
2 changes: 1 addition & 1 deletion test/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def test_preserve_line_breaks_with_maxcolwidths():

def test_maxcolwidths_accepts_list_or_tuple():
"Regression: maxcolwidths can accept a list or a tuple (github issue #214)"
table = [["lorem ipsum dolor sit amet"]*3]
table = [["lorem ipsum dolor sit amet"] * 3]
expected = "\n".join(
[
"+-------------+----------+----------------------------+",
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
Expand Down
Loading