Skip to content

Commit

Permalink
union type
Browse files Browse the repository at this point in the history
  • Loading branch information
noahshinn committed Mar 28, 2023
1 parent 10aa526 commit 404c06a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ucs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from heapq import heappush, heappop
from typing import Callable, List, Set, TypeVar, Tuple, Any
from typing import Callable, List, Set, TypeVar, Tuple, Any, Optional


State = TypeVar('State')
Expand All @@ -12,7 +12,7 @@ def ucs(
expand: Callable[[State], Set[Tuple[State, float]]],
get_unique_id: Callable[[State], UniqueID] = lambda x: x,
when_none: Callable[[List[State]], Any] = lambda x: None,
) -> State | None:
) -> Optional[State]:
"""Lazy Uniform Cost Search.
Args:
Expand Down

0 comments on commit 404c06a

Please sign in to comment.