mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-14 05:56:40 +00:00
core: Add ruff rules G, FA, INP, AIR and ISC (#29334)
Fixes mostly for rules G. See https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
This commit is contained in:
committed by
GitHub
parent
e4515f308f
commit
026de908eb
0
libs/core/tests/unit_tests/caches/__init__.py
Normal file
0
libs/core/tests/unit_tests/caches/__init__.py
Normal file
@@ -862,7 +862,7 @@ def test_get_output_messages_with_value_error() -> None:
|
||||
with_history.bound.invoke([HumanMessage(content="hello")], config)
|
||||
excepted = (
|
||||
"Expected str, BaseMessage, List[BaseMessage], or Tuple[BaseMessage]."
|
||||
+ (f" Got {illegal_bool_message}.")
|
||||
f" Got {illegal_bool_message}."
|
||||
)
|
||||
assert excepted in str(excinfo.value)
|
||||
|
||||
@@ -874,6 +874,6 @@ def test_get_output_messages_with_value_error() -> None:
|
||||
with_history.bound.invoke([HumanMessage(content="hello")], config)
|
||||
excepted = (
|
||||
"Expected str, BaseMessage, List[BaseMessage], or Tuple[BaseMessage]."
|
||||
+ (f" Got {illegal_int_message}.")
|
||||
f" Got {illegal_int_message}."
|
||||
)
|
||||
assert excepted in str(excinfo.value)
|
||||
|
@@ -994,7 +994,7 @@ def test__convert_typed_dict_to_openai_function_fail(typed_dict: type) -> None:
|
||||
)
|
||||
def test_convert_union_type_py_39() -> None:
|
||||
@tool
|
||||
def magic_function(input: int | float) -> str:
|
||||
def magic_function(input: int | float) -> str: # noqa: FA102
|
||||
"""Compute a magic function."""
|
||||
|
||||
result = convert_to_openai_function(magic_function)
|
||||
|
Reference in New Issue
Block a user