final linting

This commit is contained in:
Sydney Runkle
2025-04-22 13:40:53 -07:00
parent 8977a35060
commit edd7d608cd
@@ -1,4 +1,4 @@
from collections.abc import Sequence
from collections.abc import Sequence, Set
from typing import Any, Generic, NamedTuple, Optional, Union
from typing_extensions import Self
@@ -9,11 +9,11 @@ from langgraph.errors import EmptyChannelError, InvalidUpdateError
class WaitForNames(NamedTuple):
names: set[Any]
names: Set[Any]
class DynamicBarrierValue(
Generic[Value], BaseChannel[Value, Union[Value, WaitForNames], set[Value]]
Generic[Value], BaseChannel[Value, Union[Value, WaitForNames], Set[Value]]
):
"""A channel that switches between two states
@@ -26,7 +26,7 @@ class DynamicBarrierValue(
__slots__ = ("names", "seen")
names: Optional[set[Value]]
names: Optional[Set[Value]]
seen: set[Value]
def __init__(self, typ: type[Value]) -> None:
@@ -55,11 +55,11 @@ class DynamicBarrierValue(
empty.seen = self.seen.copy()
return empty
def checkpoint(self) -> tuple[Optional[set[Value]], set[Value]]:
def checkpoint(self) -> tuple[Optional[Set[Value]], set[Value]]:
return (self.names, self.seen)
def from_checkpoint(
self, checkpoint: tuple[Optional[set[Value]], set[Value]]
self, checkpoint: tuple[Optional[Set[Value]], set[Value]]
) -> Self:
empty = self.__class__(self.typ)
empty.key = self.key