infra: rm unused # noqa violations (#22049)

Updating #21137
This commit is contained in:
Bagatur
2024-05-22 15:21:08 -07:00
committed by GitHub
parent 45ed5f3f51
commit 50186da0a1
149 changed files with 212 additions and 214 deletions

View File

@@ -42,7 +42,7 @@ def test_indent_lines_after_first(text: str, prefix: str, expected_output: str)
def test_nonlocals() -> None:
agent = RunnableLambda(lambda x: x * 2) # noqa: F841
agent = RunnableLambda(lambda x: x * 2)
def my_func(input: str, agent: Dict[str, str]) -> str:
return agent.get("agent_name", input)

View File

@@ -143,7 +143,7 @@ def test_chat_message_chunks() -> None:
role="User", content=" indeed."
) == AIMessageChunk(
content="I am indeed."
), "Other MessageChunk + ChatMessageChunk should be a MessageChunk as the left side" # noqa: E501
), "Other MessageChunk + ChatMessageChunk should be a MessageChunk as the left side"
def test_function_message_chunks() -> None:

View File

@@ -626,7 +626,7 @@ def test_exception_handling_callable() -> None:
expected = "foo bar"
def handling(e: ToolException) -> str:
return expected # noqa: E731
return expected
_tool = _FakeExceptionTool(handle_tool_error=handling)
actual = _tool.run({})
@@ -657,7 +657,7 @@ async def test_async_exception_handling_callable() -> None:
expected = "foo bar"
def handling(e: ToolException) -> str:
return expected # noqa: E731
return expected
_tool = _FakeExceptionTool(handle_tool_error=handling)
actual = await _tool.arun({})
@@ -723,7 +723,7 @@ def test_validation_error_handling_callable() -> None:
expected = "foo bar"
def handling(e: ValidationError) -> str:
return expected # noqa: E731
return expected
_tool = _MockStructuredTool(handle_validation_error=handling)
actual = _tool.run({})
@@ -785,7 +785,7 @@ async def test_async_validation_error_handling_callable() -> None:
expected = "foo bar"
def handling(e: ValidationError) -> str:
return expected # noqa: E731
return expected
_tool = _MockStructuredTool(handle_validation_error=handling)
actual = await _tool.arun({})