From eba5cf6a82171d337a7812fb226bbd734fa08ddd Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sat, 14 Mar 2026 10:01:41 +0000 Subject: [PATCH] fix: resolve ruff lint errors (unused imports and variables) --- src/claude_memory/api/app.py | 1 - tests/test_credential_detector.py | 2 -- tests/test_crypto.py | 2 -- tests/test_mcp_server.py | 2 +- tests/test_vault_client.py | 3 +-- 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/claude_memory/api/app.py b/src/claude_memory/api/app.py index 89529eb..b3e60ac 100644 --- a/src/claude_memory/api/app.py +++ b/src/claude_memory/api/app.py @@ -2,7 +2,6 @@ import logging from contextlib import asynccontextmanager -from datetime import datetime, timezone from typing import Optional from fastapi import Depends, FastAPI, HTTPException diff --git a/tests/test_credential_detector.py b/tests/test_credential_detector.py index 9de7818..62c0450 100644 --- a/tests/test_credential_detector.py +++ b/tests/test_credential_detector.py @@ -1,9 +1,7 @@ """Tests for credential detection and redaction.""" -import pytest from claude_memory.credential_detector import ( - DetectedCredential, detect_credentials, is_sensitive, redact_credentials, diff --git a/tests/test_crypto.py b/tests/test_crypto.py index 4470abd..c4c47f5 100644 --- a/tests/test_crypto.py +++ b/tests/test_crypto.py @@ -1,7 +1,5 @@ """Tests for AES-256-GCM encryption module.""" -import hashlib -import os import pytest diff --git a/tests/test_mcp_server.py b/tests/test_mcp_server.py index 3a429e4..a57c868 100644 --- a/tests/test_mcp_server.py +++ b/tests/test_mcp_server.py @@ -13,7 +13,7 @@ os.environ.pop("CLAUDE_MEMORY_API_KEY", None) # Add src to path so we can import without installing sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src")) -from claude_memory.mcp_server import MemoryServer, TOOLS, SERVER_NAME, SERVER_VERSION, PROTOCOL_VERSION +from claude_memory.mcp_server import MemoryServer, SERVER_NAME, SERVER_VERSION, PROTOCOL_VERSION @pytest.fixture diff --git a/tests/test_vault_client.py b/tests/test_vault_client.py index 372781a..1f68872 100644 --- a/tests/test_vault_client.py +++ b/tests/test_vault_client.py @@ -1,7 +1,6 @@ """Tests for Vault KV v2 client with mocked urllib.""" import json -import os from io import BytesIO from unittest.mock import MagicMock, mock_open, patch @@ -100,7 +99,7 @@ class TestVaultWrite: mock_urlopen.return_value = mock_response client = VaultClient() - result = client.write("myapp/config", {"key": "value"}) + client.write("myapp/config", {"key": "value"}) # Verify the request was made with correct data call_args = mock_urlopen.call_args