Skip to content

Commit 3ace903

Browse files
fix(lint): remove unused imports in encryption modules
Fixes F401 lint errors in agent-mesh: - x3dh.py: remove unused os, VerifyKey imports - channel.py: remove unused X3DHResult import - bridge.py: remove unused field, Optional imports Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7e22b33 commit 3ace903

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

packages/agent-mesh/src/agentmesh/encryption/bridge.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
from __future__ import annotations
2121

2222
import logging
23-
from dataclasses import dataclass, field
24-
from typing import Optional
23+
from dataclasses import dataclass
2524

2625
from agentmesh.encryption.channel import ChannelEstablishment, SecureChannel
2726
from agentmesh.encryption.x3dh import InMemoryPreKeyStore, PreKeyBundle, PreKeyStore, X3DHKeyManager

packages/agent-mesh/src/agentmesh/encryption/channel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from dataclasses import dataclass
2020

2121
from agentmesh.encryption.ratchet import DoubleRatchet, EncryptedMessage
22-
from agentmesh.encryption.x3dh import PreKeyBundle, X3DHKeyManager, X3DHResult
22+
from agentmesh.encryption.x3dh import PreKeyBundle, X3DHKeyManager
2323

2424
logger = logging.getLogger(__name__)
2525

packages/agent-mesh/src/agentmesh/encryption/x3dh.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from __future__ import annotations
1313

1414
import logging
15-
import os
1615
import secrets
1716
from dataclasses import dataclass, field
1817
from typing import Protocol
@@ -324,8 +323,6 @@ def respond(
324323
@staticmethod
325324
def _verify_signed_pre_key(bundle: PreKeyBundle) -> None:
326325
"""Verify the signed pre-key signature against the identity key."""
327-
from nacl.signing import VerifyKey
328-
329326
# Convert X25519 identity key back to Ed25519 is not directly possible,
330327
# so we verify using the signature which was created with Ed25519.
331328
# The bundle must carry enough info to verify. For now, we verify

0 commit comments

Comments
 (0)