From 84a45d186c22fa32fa4352a7317950406e1cb883 Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Sun, 22 Sep 2024 12:42:34 -0700 Subject: [PATCH] Fix --- libs/langgraph/tests/any_str.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/langgraph/tests/any_str.py b/libs/langgraph/tests/any_str.py index 5995d0e52..5643a00fb 100644 --- a/libs/langgraph/tests/any_str.py +++ b/libs/langgraph/tests/any_str.py @@ -1,8 +1,13 @@ import re from typing import Any, Sequence, Union +from typing_extensions import Self + class FloatBetween(float): + def __new__(cls, min_value: float, max_value: float) -> Self: + return super().__new__(cls, min_value) + def __init__(self, min_value: float, max_value: float) -> None: super().__init__() self.min_value = min_value