Skip to content

Commit a8e5ba8

Browse files
committed
linting issues
Signed-off-by: Keval Mahajan <mahajankeval23@gmail.com>
1 parent 64d43cc commit a8e5ba8

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

mcpgateway/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ def parse_issuers(cls, v: Any) -> list[str]:
926926
health_check_timeout: int = 10 # seconds
927927
unhealthy_threshold: int = 5 # after this many failures, mark as Offline
928928
max_concurrent_health_checks: int = 20 # maximum concurrent health checks per worker
929-
929+
930930
# Validation Gateway URL
931931
gateway_validation_timeout: int = 5 # seconds
932932
gateway_max_redirects: int = 5

mcpgateway/services/gateway_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,7 @@ async def limited_check(gateway: DbGateway):
21562156
chunk_size = concurrency_limit
21572157
for i in range(0, len(gateways), chunk_size):
21582158
# batch will be a sublist of gateways from index i to i + chunk_size
2159-
batch = gateways[i:i + chunk_size]
2159+
batch = gateways[i : i + chunk_size]
21602160

21612161
# Each task is a health check for a gateway in the batch, excluding those with auth_type == "one_time_auth"
21622162
tasks = [limited_check(gw) for gw in batch if gw.auth_type != "one_time_auth"]
@@ -2166,7 +2166,7 @@ async def limited_check(gateway: DbGateway):
21662166
await asyncio.sleep(0.05) # small pause prevents network saturation
21672167

21682168
elapsed = time.monotonic() - start_time
2169-
2169+
21702170
if batch_span:
21712171
batch_span.set_attribute("check.duration_ms", int(elapsed * 1000))
21722172
batch_span.set_attribute("check.completed", True)

mcpgateway/services/tool_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@ async def get_top_tools(self, db: Session, limit: Optional[int] = 5) -> List[Top
308308
- last_execution: Timestamp of the last execution, or None if no metrics.
309309
"""
310310

311-
success_rate = case((func.count(ToolMetric.id) > 0, func.sum(case((ToolMetric.is_success.is_(True), 1), else_=0)).cast(Float) * 100 / func.count(ToolMetric.id)), else_=None) # pylint: disable=not-callable
311+
success_rate = case(
312+
(func.count(ToolMetric.id) > 0, func.sum(case((ToolMetric.is_success.is_(True), 1), else_=0)).cast(Float) * 100 / func.count(ToolMetric.id)), else_=None # pylint: disable=not-callable
313+
)
312314

313315
query = (
314316
select(

0 commit comments

Comments
 (0)