mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
style: Format test files with ruff
Reformatted test_e2e_demo.py, test_memory_base.py, and test_memory_consolidated.py to pass CI ruff format check.
This commit is contained in:
@@ -16,6 +16,7 @@ try:
|
||||
check_local_llm_status,
|
||||
create_local_distributed_network,
|
||||
)
|
||||
|
||||
HANZO_NETWORK_AVAILABLE = True
|
||||
except ImportError:
|
||||
HANZO_NETWORK_AVAILABLE = False
|
||||
@@ -23,8 +24,7 @@ except ImportError:
|
||||
|
||||
# Skip entire module if hanzo_network is not available
|
||||
pytestmark = pytest.mark.skipif(
|
||||
not HANZO_NETWORK_AVAILABLE,
|
||||
reason="hanzo_network package not installed or numpy not available"
|
||||
not HANZO_NETWORK_AVAILABLE, reason="hanzo_network package not installed or numpy not available"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -10,16 +10,14 @@ from conftest import ToolTestHelper, create_mock_ctx
|
||||
# Import guard for optional hanzo_memory dependency
|
||||
try:
|
||||
from hanzo_memory.models import Memory
|
||||
|
||||
HANZO_MEMORY_AVAILABLE = True
|
||||
except ImportError:
|
||||
HANZO_MEMORY_AVAILABLE = False
|
||||
Memory = None # type: ignore
|
||||
|
||||
# Skip entire module if hanzo_memory is not available
|
||||
pytestmark = pytest.mark.skipif(
|
||||
not HANZO_MEMORY_AVAILABLE,
|
||||
reason="hanzo_memory package not installed"
|
||||
)
|
||||
pytestmark = pytest.mark.skipif(not HANZO_MEMORY_AVAILABLE, reason="hanzo_memory package not installed")
|
||||
|
||||
# Only import these if hanzo_memory is available
|
||||
if HANZO_MEMORY_AVAILABLE:
|
||||
|
||||
@@ -7,15 +7,13 @@ import pytest
|
||||
# Import guard for optional hanzo_memory dependency
|
||||
try:
|
||||
from hanzo_memory.models import Memory
|
||||
|
||||
HANZO_MEMORY_AVAILABLE = True
|
||||
except ImportError:
|
||||
HANZO_MEMORY_AVAILABLE = False
|
||||
|
||||
# Skip entire module if hanzo_memory is not available
|
||||
pytestmark = pytest.mark.skipif(
|
||||
not HANZO_MEMORY_AVAILABLE,
|
||||
reason="hanzo_memory package not installed"
|
||||
)
|
||||
pytestmark = pytest.mark.skipif(not HANZO_MEMORY_AVAILABLE, reason="hanzo_memory package not installed")
|
||||
|
||||
# Only import these if hanzo_memory is available
|
||||
if HANZO_MEMORY_AVAILABLE:
|
||||
@@ -71,7 +69,9 @@ class TestMemoryToolsConsolidated(MemoryTestBase):
|
||||
{"query": "test query", "limit": 5},
|
||||
"Found 1 relevant memories",
|
||||
),
|
||||
] if HANZO_MEMORY_AVAILABLE else [],
|
||||
]
|
||||
if HANZO_MEMORY_AVAILABLE
|
||||
else [],
|
||||
)
|
||||
async def test_memory_operations(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user