Skip to content

Commit

Permalink
Merge pull request #265 from arpitjain099/master
Browse files Browse the repository at this point in the history
Fix code quality errors
  • Loading branch information
astanin authored Sep 26, 2024
2 parents 97d825b + d38740c commit 8946da0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions tabulate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import math
import textwrap
import dataclasses
import sys

try:
import wcwidth # optional wide-character (CJK) support
Expand Down Expand Up @@ -1359,9 +1360,7 @@ def _normalize_tabular_data(tabular_data, headers, showindex="default"):

try:
bool(headers)
is_headers2bool_broken = False # noqa
except ValueError: # numpy.ndarray, pandas.core.index.Index, ...
is_headers2bool_broken = True # noqa
headers = list(headers)

index = None
Expand Down Expand Up @@ -2718,8 +2717,6 @@ def _main():
(default: simple)
"""
import getopt
import sys
import textwrap

usage = textwrap.dedent(_main.__doc__)
try:
Expand Down
2 changes: 0 additions & 2 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
from pytest import skip, raises # noqa
import warnings


def assert_equal(expected, result):
print("Expected:\n%s\n" % expected)
print("Got:\n%s\n" % result)
assert expected == result


def assert_in(result, expected_set):
nums = range(1, len(expected_set) + 1)
for i, expected in zip(nums, expected_set):
Expand Down

0 comments on commit 8946da0

Please sign in to comment.