Skip to content

Commit

Permalink
Fix mypy List typing.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroCabeza committed Sep 2, 2024
1 parent 6a090f6 commit 7a50a67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/patmat_option.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
"""
Example on pattern matching handling of Option
"""
from typing import List

from rusty_results import Option, Some, Empty


def find_index(l: [str], value: str) -> Option[int]:
def find_index(l: List[str], value: str) -> Option[int]:
for i, e in enumerate(l):
if e == value:
return Some(i)
Expand Down

0 comments on commit 7a50a67

Please sign in to comment.