Skip to content

Commit 77ffaef

Browse files
Copilot0xrinegade
andcommitted
Fix Python import sorting issues as requested by CI
Co-authored-by: 0xrinegade <[email protected]>
1 parent d7903a8 commit 77ffaef

File tree

5 files changed

+30
-27
lines changed

5 files changed

+30
-27
lines changed

python/solana_ai_registries/__init__.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,28 @@
1919
__author__ = "AEAMCP Team"
2020
__email__ = "[email protected]"
2121

22+
from .agent import AgentRegistry
23+
2224
# Core API exports
2325
from .client import SolanaAIRegistriesClient
24-
from .agent import AgentRegistry
26+
from .exceptions import (
27+
AgentExistsError,
28+
InsufficientFundsError,
29+
McpServerExistsError,
30+
SolanaAIRegistriesError,
31+
TransactionError,
32+
ValidationError,
33+
)
2534
from .mcp import McpServerRegistry
2635
from .payments import PaymentManager
2736
from .types import (
2837
AgentRegistryEntry,
29-
McpServerRegistryEntry,
38+
AgentSkill,
3039
AgentStatus,
40+
McpCapabilities,
41+
McpServerRegistryEntry,
3142
McpServerStatus,
3243
ServiceEndpoint,
33-
AgentSkill,
34-
McpCapabilities,
35-
)
36-
from .exceptions import (
37-
SolanaAIRegistriesError,
38-
ValidationError,
39-
AgentExistsError,
40-
McpServerExistsError,
41-
InsufficientFundsError,
42-
TransactionError,
4344
)
4445

4546
__all__ = [

python/solana_ai_registries/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
providing clear error messages and proper inheritance hierarchy.
66
"""
77

8-
from typing import Optional, Any, Dict
8+
from typing import Any, Dict, Optional
99

1010

1111
class SolanaAIRegistriesError(Exception):

python/solana_ai_registries/types.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@
66
"""
77

88
from dataclasses import dataclass, field
9-
from typing import Optional, List, Dict, Any, Union
10-
from enum import Enum
119
from decimal import Decimal
10+
from enum import Enum
11+
from typing import Any, Dict, List, Optional, Union
1212

1313
from .constants import (
14+
MAX_AGENT_DESCRIPTION_LEN,
1415
MAX_AGENT_ID_LEN,
1516
MAX_AGENT_NAME_LEN,
16-
MAX_AGENT_DESCRIPTION_LEN,
1717
MAX_SERVER_ID_LEN,
1818
MAX_SERVER_NAME_LEN,
1919
validate_string_length,
2020
validate_url,
2121
)
2222

23-
2423
# ============================================================================
2524
# ENUMS
2625
# ============================================================================

python/tests/conftest.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
unit and integration tests.
66
"""
77

8-
import pytest
98
import asyncio
10-
from typing import AsyncGenerator, Dict, Any
11-
from unittest.mock import Mock, AsyncMock
9+
from typing import Any, AsyncGenerator, Dict
10+
from unittest.mock import AsyncMock, Mock
11+
12+
import pytest
1213
from solders.keypair import Keypair
1314
from solders.pubkey import Pubkey
1415

python/tests/test_imports.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66
def test_package_imports():
77
"""Test that all main package components can be imported."""
88
# Core imports
9-
from solana_ai_registries import SolanaAIRegistriesClient
10-
from solana_ai_registries import AgentRegistry
11-
from solana_ai_registries import McpServerRegistry
12-
from solana_ai_registries import PaymentManager
9+
from solana_ai_registries import (
10+
AgentRegistry,
11+
McpServerRegistry,
12+
PaymentManager,
13+
SolanaAIRegistriesClient,
14+
)
15+
from solana_ai_registries.constants import AGENT_REGISTRY_PROGRAM_ID
16+
from solana_ai_registries.exceptions import SolanaAIRegistriesError
1317

1418
# Type imports
1519
from solana_ai_registries.types import AgentStatus, McpServerStatus
16-
from solana_ai_registries.constants import AGENT_REGISTRY_PROGRAM_ID
17-
from solana_ai_registries.exceptions import SolanaAIRegistriesError
1820

1921
# All imports successful
2022
assert True
@@ -23,10 +25,10 @@ def test_package_imports():
2325
def test_placeholder_classes_exist():
2426
"""Test that placeholder classes are instantiable."""
2527
from solana_ai_registries import (
26-
SolanaAIRegistriesClient,
2728
AgentRegistry,
2829
McpServerRegistry,
2930
PaymentManager,
31+
SolanaAIRegistriesClient,
3032
)
3133

3234
# These should not raise exceptions

0 commit comments

Comments
 (0)