Fix CI issues: type-checker, lint errors (S101, RET504, B904)

- Add type ignore for create_model call to fix type-checker error
- Fix exception chaining (B904) by using 'from e' syntax
- Fix unnecessary assignment (RET504) by returning directly
- Add noqa comments for S101 assert detection in test file

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-09-10 01:58:41 +00:00
parent a533e111e8
commit bbf76d0e42
2 changed files with 8 additions and 9 deletions

View File

@@ -163,12 +163,12 @@ def test_tool_not_executed_twice():
result = tool.invoke({"param": "test"})
assert call_count == 1, f"Expected function to be called once, but was called {call_count} times"
assert result == "Called 1 times with test"
assert call_count == 1, f"Expected function to be called once, but was called {call_count} times" # noqa: S101
assert result == "Called 1 times with test" # noqa: S101
result = tool.invoke({"param": "test2"})
assert call_count == 2, f"Expected function to be called twice total, but was called {call_count} times"
assert result == "Called 2 times with test2"
assert call_count == 2, f"Expected function to be called twice total, but was called {call_count} times" # noqa: S101
assert result == "Called 2 times with test2" # noqa: S101
@pytest.fixture
def custom_tool_decorator():