Skip to content

Commit

Permalink
[mypy] fix: fix mypy error in singly_linked_list.py (TheAlgorithms#5517)
Browse files Browse the repository at this point in the history
The list comprehension shortcut was implicitly expecting a return
value causing a mypy error since `insert_tail` doesn't return a value
  • Loading branch information
shermanhui authored Oct 22, 2021
1 parent fdf095f commit 9153db2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data_structures/linked_list/singly_linked_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ def test_singly_linked_list_2() -> None:
12.20,
]
linked_list = LinkedList()
[linked_list.insert_tail(i) for i in input]

for i in input:
linked_list.insert_tail(i)

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

0 comments on commit 9153db2

Please sign in to comment.