mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 09:08:31 +00:00
Fix lint issues and update agent.execute_task for recursion depth
- Remove unused imports and variables in test files - Replace bare except with specific exception in structured_output_converter.py - Fix None comparison in llm_test.py - Update agent.execute_task to accept recursion_depth parameter Resolves all remaining lint issues for A2A protocol implementation. Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import uuid
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import pytest
|
||||
from pydantic import ValidationError
|
||||
|
||||
from crewai.security import Fingerprint
|
||||
|
||||
@@ -223,7 +222,7 @@ def test_invalid_uuid_str():
|
||||
|
||||
# But this will raise an exception when we try to access the uuid property
|
||||
with pytest.raises(ValueError):
|
||||
uuid_obj = fingerprint.uuid
|
||||
fingerprint.uuid
|
||||
|
||||
|
||||
def test_fingerprint_metadata_mutation():
|
||||
@@ -260,4 +259,4 @@ def test_fingerprint_metadata_mutation():
|
||||
|
||||
# Ensure immutable fields remain unchanged
|
||||
assert fingerprint.uuid_str == uuid_str
|
||||
assert fingerprint.created_at == created_at
|
||||
assert fingerprint.created_at == created_at
|
||||
|
||||
@@ -67,9 +67,6 @@ def test_security_config_from_dict():
|
||||
}
|
||||
|
||||
# Create a config dict with just the fingerprint
|
||||
config_dict = {
|
||||
"fingerprint": fingerprint_dict
|
||||
}
|
||||
|
||||
# Create config manually since from_dict has a specific implementation
|
||||
config = SecurityConfig()
|
||||
@@ -115,4 +112,4 @@ def test_security_config_json_serialization():
|
||||
new_config.fingerprint = new_fingerprint
|
||||
|
||||
# Check the new config has the same fingerprint metadata
|
||||
assert new_config.fingerprint.metadata == {"version": "1.0"}
|
||||
assert new_config.fingerprint.metadata == {"version": "1.0"}
|
||||
|
||||
Reference in New Issue
Block a user