Skip to content

Commit 38395aa

Browse files
Apply ruff rule RUF100
Unused blanket `noqa` directive
1 parent 2de95e5 commit 38395aa

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

tabulate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ def _format(val, valtype, floatfmt, intfmt, missingval="", has_invisible=True):
13211321
tabulate(tbl, headers=hrow) == good_result
13221322
True
13231323
1324-
""" # noqa: E501
1324+
"""
13251325
if val is None:
13261326
return missingval
13271327
if isinstance(val, (bytes, str)) and not val:

test/test_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_tabulate_formats():
1717
print("tabulate_formats = %r" % supported)
1818
assert type(supported) is list
1919
for fmt in supported:
20-
assert type(fmt) is str # noqa
20+
assert type(fmt) is str
2121

2222

2323
def _check_signature(function, expected_sig):
@@ -34,7 +34,7 @@ def _check_signature(function, expected_sig):
3434

3535
def test_tabulate_signature():
3636
"API: tabulate() type signature is unchanged"
37-
assert type(tabulate) is type(lambda: None) # noqa
37+
assert type(tabulate) is type(lambda: None)
3838
expected_sig = [
3939
("tabular_data", _empty),
4040
("headers", ()),
@@ -62,6 +62,6 @@ def test_tabulate_signature():
6262

6363
def test_simple_separated_format_signature():
6464
"API: simple_separated_format() type signature is unchanged"
65-
assert type(simple_separated_format) is type(lambda: None) # noqa
65+
assert type(simple_separated_format) is type(lambda: None)
6666
expected_sig = [("separator", _empty)]
6767
_check_signature(simple_separated_format, expected_sig)

test/test_output.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_plain_maxcolwidth_autowraps_wide_chars():
131131
["hdr", "fold"],
132132
[
133133
"1",
134-
"약간 감싸면 더 잘 보일 수있는 다소 긴 설명입니다 설명입니다 설명입니다 설명입니다 설명", # noqa: E501
134+
"약간 감싸면 더 잘 보일 수있는 다소 긴 설명입니다 설명입니다 설명입니다 설명입니다 설명",
135135
],
136136
]
137137
expected = "\n".join(
@@ -2570,7 +2570,7 @@ def test_html():
25702570
[
25712571
"<table>",
25722572
"<thead>",
2573-
'<tr><th>&lt;strings&gt; </th><th style="text-align: right;"> &lt;&amp;numbers&amp;&gt;</th></tr>', # noqa
2573+
'<tr><th>&lt;strings&gt; </th><th style="text-align: right;"> &lt;&amp;numbers&amp;&gt;</th></tr>',
25742574
"</thead>",
25752575
"<tbody>",
25762576
'<tr><td>spam &gt; </td><td style="text-align: right;"> 41.9999</td></tr>',
@@ -2591,7 +2591,7 @@ def test_unsafehtml():
25912591
[
25922592
"<table>",
25932593
"<thead>",
2594-
"<tr><th>strings </th><th>numbers </th></tr>", # noqa
2594+
"<tr><th>strings </th><th>numbers </th></tr>",
25952595
"</thead>",
25962596
"<tbody>",
25972597
'<tr><td>spam </td><td><font color="red">41.9999</font></td></tr>',

0 commit comments

Comments
 (0)