Skip to content

Commit 9153db2

Browse files
authored
[mypy] fix: fix mypy error in singly_linked_list.py (#5517)
The list comprehension shortcut was implicitly expecting a return value causing a mypy error since `insert_tail` doesn't return a value
1 parent fdf095f commit 9153db2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

data_structures/linked_list/singly_linked_list.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,9 @@ def test_singly_linked_list_2() -> None:
409409
12.20,
410410
]
411411
linked_list = LinkedList()
412-
[linked_list.insert_tail(i) for i in input]
412+
413+
for i in input:
414+
linked_list.insert_tail(i)
413415

414416
# Check if it's empty or not
415417
assert linked_list.is_empty() is False

0 commit comments

Comments
 (0)