Skip to content

Commit 8f32086

Browse files
DimitriPapadopoulosastanin
authored andcommitted
Apply ruff/Pylint rule PLW0108
Lambda may be unnecessary; consider inlining inner function
1 parent 3381cfc commit 8f32086

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/test_input.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313
def test_iterable_of_iterables():
1414
"Input: an iterable of iterables."
15-
ii = iter(map(lambda x: iter(x), [range(5), range(5, 0, -1)]))
15+
ii = iter(map(iter, [range(5), range(5, 0, -1)]))
1616
expected = "\n".join(["- - - - -", "0 1 2 3 4", "5 4 3 2 1", "- - - - -"])
1717
result = tabulate(ii)
1818
assert_equal(expected, result)
1919

2020

2121
def test_iterable_of_iterables_headers():
2222
"Input: an iterable of iterables with headers."
23-
ii = iter(map(lambda x: iter(x), [range(5), range(5, 0, -1)]))
23+
ii = iter(map(iter, [range(5), range(5, 0, -1)]))
2424
expected = "\n".join(
2525
[
2626
" a b c d e",
@@ -35,7 +35,7 @@ def test_iterable_of_iterables_headers():
3535

3636
def test_iterable_of_iterables_firstrow():
3737
"Input: an iterable of iterables with the first row as headers"
38-
ii = iter(map(lambda x: iter(x), ["abcde", range(5), range(5, 0, -1)]))
38+
ii = iter(map(iter, ["abcde", range(5), range(5, 0, -1)]))
3939
expected = "\n".join(
4040
[
4141
" a b c d e",

0 commit comments

Comments
 (0)