[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
This commit is contained in:
Sherman Hui 2021-10-21 20:39:18 -07:00 committed by GitHub
parent fdf095f69f
commit 9153db2d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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