diff --git a/libs/langgraph/langgraph/pregel/__init__.py b/libs/langgraph/langgraph/pregel/__init__.py index 2a369aa17..f9738d211 100644 --- a/libs/langgraph/langgraph/pregel/__init__.py +++ b/libs/langgraph/langgraph/pregel/__init__.py @@ -557,7 +557,7 @@ class Pregel(PregelProtocol): self.validate() def get_graph( - self, config: RunnableConfig | None = None, *, xray: int | bool = Fals + self, config: RunnableConfig | None = None, *, xray: int | bool = False ) -> Graph: """Returns a drawable representation of the computation graph.""" # gather subgraphs @@ -585,10 +585,7 @@ class Pregel(PregelProtocol): ) async def aget_graph( - self, - config: RunnableConfig | None = None, - *, - xray: int | bool = False + self, config: RunnableConfig | None = None, *, xray: int | bool = False ) -> Graph: """Returns a drawable representation of the computation graph.""" diff --git a/libs/langgraph/langgraph/pregel/draw.py b/libs/langgraph/langgraph/pregel/draw.py index 596935f79..a32aaeded 100644 --- a/libs/langgraph/langgraph/pregel/draw.py +++ b/libs/langgraph/langgraph/pregel/draw.py @@ -1,5 +1,6 @@ from collections import defaultdict -from typing import Any, Mapping, Optional, Sequence, Union, cast +from collections.abc import Mapping, Sequence +from typing import Any, Optional, Union, cast from langchain_core.runnables.config import RunnableConfig from langchain_core.runnables.graph import Graph, Node diff --git a/libs/langgraph/langgraph/pregel/write.py b/libs/langgraph/langgraph/pregel/write.py index ed8955474..98b6dd587 100644 --- a/libs/langgraph/langgraph/pregel/write.py +++ b/libs/langgraph/langgraph/pregel/write.py @@ -5,6 +5,7 @@ from typing import ( Any, Callable, NamedTuple, + Optional, TypeVar, Union, cast, diff --git a/libs/langgraph/tests/test_pregel.py b/libs/langgraph/tests/test_pregel.py index b6333d0de..ce6474ca1 100644 --- a/libs/langgraph/tests/test_pregel.py +++ b/libs/langgraph/tests/test_pregel.py @@ -3090,6 +3090,7 @@ def test_in_one_fan_out_state_graph_waiting_edge_custom_state_class_pydantic_inp } } + @pytest.mark.parametrize("checkpointer_name", ALL_CHECKPOINTERS_SYNC) def test_in_one_fan_out_state_graph_waiting_edge_plus_regular( request: pytest.FixtureRequest, checkpointer_name: str diff --git a/libs/langgraph/tests/test_pydantic.py b/libs/langgraph/tests/test_pydantic.py index ad94724b5..53e6fe4e7 100644 --- a/libs/langgraph/tests/test_pydantic.py +++ b/libs/langgraph/tests/test_pydantic.py @@ -6,7 +6,7 @@ import re import sys import uuid from enum import Enum -from typing import Annotated, List, Literal, Optional, Union +from typing import Annotated, Literal, Optional, Union import pytest @@ -183,7 +183,7 @@ def test_nested_pydantic_models(version: str) -> None: validated_age: Annotated[int, Field(gt=0, lt=120)] # Generic containers with validators - decimal_list: List[decimal.Decimal] + decimal_list: list[decimal.Decimal] id_tuple: tuple[uuid.UUID, uuid.UUID] inputs = {