Skip to content

Commit fe93079

Browse files
committed
fix: resolve import sorting and type checking issues
- Fixed import sorting in kong_rate_limiting.py and test file - Added type casting to resolve mypy no-any-return warnings - All CI checks now pass locally
1 parent b11dd11 commit fe93079

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/kong_mcp_server/tools/kong_rate_limiting.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""Kong rate limiting plugin management tools."""
22

3-
from typing import Any, Dict, List, Optional
3+
from typing import Any, Dict, List, Optional, cast
44

55
from kong_mcp_server.kong_client import KongClient
66

7-
87
# Basic Rate Limiting Plugin Tools
98

109

@@ -156,7 +155,7 @@ async def get_rate_limiting_plugins(
156155

157156
async with KongClient() as client:
158157
response = await client.get(endpoint, params=params)
159-
return response.get("data", [])
158+
return cast(List[Dict[str, Any]], response.get("data", []))
160159

161160

162161
async def update_rate_limiting_plugin(
@@ -332,4 +331,4 @@ async def get_plugins(
332331

333332
async with KongClient() as client:
334333
response = await client.get(endpoint, params=params)
335-
return response.get("data", [])
334+
return cast(List[Dict[str, Any]], response.get("data", []))

tests/test_tools_kong_rate_limiting.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
"""Unit tests for Kong rate limiting plugin management tools."""
22

3-
import pytest
43
from unittest.mock import AsyncMock, patch
54

5+
import pytest
6+
67
from kong_mcp_server.tools.kong_rate_limiting import (
78
create_rate_limiting_plugin,
8-
get_rate_limiting_plugins,
9-
update_rate_limiting_plugin,
109
delete_rate_limiting_plugin,
1110
get_plugin,
1211
get_plugins,
12+
get_rate_limiting_plugins,
13+
update_rate_limiting_plugin,
1314
)
1415

1516

0 commit comments

Comments
 (0)