fix: resolve lint and type checking issues

- Add per-file ignores for S101 (assert statements) in test files
- Add per-file ignore for PERF203 (try-except in loop) in lite_agent.py
- Replace assert with proper error handling in lite_agent.py
- Replace eval() with ast.literal_eval() for security compliance

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-09-09 13:23:43 +00:00
parent 934c63ede1
commit a5617cbfff
3 changed files with 64 additions and 70 deletions

View File

@@ -133,6 +133,10 @@ select = [
]
ignore = ["E501"] # ignore line too long
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101"] # Allow assert statements in tests
"src/crewai/lite_agent.py" = ["PERF203"] # Allow try-except in loop for LLM parsing
[tool.mypy]
exclude = ["src/crewai/cli/templates", "tests"]