The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
core[patch]: Add missing type annotations (#22756)
Eugene Yurtsev5a7eac191a11
diff --git a/libs/core/langchain_core/output_parsers/list.py b/libs/core/langchain_core/output_parsers/list.pyindex 7fd96c94d8..2fdb3e0f10 100644--- a/libs/core/langchain_core/output_parsers/list.py+++ b/libs/core/langchain_core/output_parsers/list.py@@ -130,7 +130,7 @@ class CommaSeparatedListOutputParser(ListOutputParser):class NumberedListOutputParser(ListOutputParser):"""Parse a numbered list."""- pattern = r"\d+\.\s([^\n]+)"+ pattern: str = r"\d+\.\s([^\n]+)"def get_format_instructions(self) -> str:return (@@ -154,7 +154,7 @@ class NumberedListOutputParser(ListOutputParser):class MarkdownListOutputParser(ListOutputParser):"""Parse a markdown list."""- pattern = r"^\s*[-*]\s([^\n]+)$"+ pattern: str = r"^\s*[-*]\s([^\n]+)$"def get_format_instructions(self) -> str:return "Your response should be a markdown list, " "eg: `- foo\n- bar\n- baz`"diff --git a/libs/core/langchain_core/tracers/evaluation.py b/libs/core/langchain_core/tracers/evaluation.pyindex 3caeda2b0c..74890749f3 100644--- a/libs/core/langchain_core/tracers/evaluation.py+++ b/libs/core/langchain_core/tracers/evaluation.py@@ -64,7 +64,7 @@ class EvaluatorCallbackHandler(BaseTracer):The LangSmith project name to be organize eval chain runs under."""- name = "evaluator_callback_handler"+ name: str = "evaluator_callback_handler"def __init__(self,diff --git a/libs/core/tests/unit_tests/test_tools.py b/libs/core/tests/unit_tests/test_tools.pyindex f61cac1b54..cc624f4cfd 100644--- a/libs/core/tests/unit_tests/test_tools.py+++ b/libs/core/tests/unit_tests/test_tools.py@@ -744,8 +744,8 @@ def test_validation_error_handling_non_validation_error("""Test that validation errors are handled correctly."""class _RaiseNonValidationErrorTool(BaseTool):- name = "raise_non_validation_error_tool"- description = "A tool that raises a non-validation error"+ name: str = "raise_non_validation_error_tool"+ description: str = "A tool that raises a non-validation error"def _parse_input(self,@@ -806,8 +806,8 @@ async def test_async_validation_error_handling_non_validation_error("""Test that validation errors are handled correctly."""class _RaiseNonValidationErrorTool(BaseTool):- name = "raise_non_validation_error_tool"- description = "A tool that raises a non-validation error"+ name: str = "raise_non_validation_error_tool"+ description: str = "A tool that raises a non-validation error"def _parse_input(self,