Skip to content

Commit aa29f17

Browse files
committed
Change to always return int
1 parent 19d65af commit aa29f17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mypyc/test-data/run-lists.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,11 +489,11 @@ def test_from_gen() -> None:
489489
[case testNext]
490490
from typing import List
491491

492-
def get_next(x: List[int]) -> int | None:
493-
return next((i for i in x), None)
492+
def get_next(x: List[int]) -> int:
493+
return next((i for i in x), -1)
494494

495495
def test_next() -> None:
496-
assert get_next([]) is None
496+
assert get_next([]) == -1
497497
assert get_next([1]) == 1
498498
assert get_next([3,2,1]) == 3
499499

0 commit comments

Comments
 (0)