Skip to content

Commit ad20942

Browse files
committed
autoflake isort black
Signed-off-by: Mihai Criveti <[email protected]>
1 parent 74dc27b commit ad20942

File tree

9 files changed

+26
-25
lines changed

9 files changed

+26
-25
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
22
max-line-length = 600
33
per-file-ignores =
4-
mcpgateway/services/gateway_service.py: DAR401,DAR402
4+
mcpgateway/services/gateway_service.py: DAR401,DAR402

docs/docs/development/.pages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ nav:
77
- review.md
88
- packaging.md
99
- developer-workstation.md
10+
- doctest-coverage.md

docs/docs/development/doctest-coverage.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,20 @@ All doctests follow the Google docstring format with an "Examples:" section:
9595
```python
9696
def create_slug(text: str) -> str:
9797
"""Convert text to URL-friendly slug.
98-
98+
9999
Args:
100100
text: Input text to convert
101-
101+
102102
Returns:
103103
URL-friendly slug string
104-
104+
105105
Examples:
106106
>>> create_slug("Hello World!")
107107
'hello-world'
108-
108+
109109
>>> create_slug("Special@#$Characters")
110110
'special-characters'
111-
111+
112112
>>> create_slug(" Multiple Spaces ")
113113
'multiple-spaces'
114114
"""
@@ -128,7 +128,7 @@ def create_slug(text: str) -> str:
128128
```python
129129
async def connect(self) -> None:
130130
"""Set up transport connection.
131-
131+
132132
Examples:
133133
>>> transport = MyTransport()
134134
>>> import asyncio
@@ -143,7 +143,7 @@ async def connect(self) -> None:
143143
```python
144144
def send_message(self, message: Dict[str, Any]) -> None:
145145
"""Send message over transport.
146-
146+
147147
Examples:
148148
>>> from unittest.mock import Mock, AsyncMock
149149
>>> mock_transport = Mock()
@@ -210,29 +210,29 @@ When adding new functions or methods:
210210
```python
211211
def new_function(param1: str, param2: int) -> bool:
212212
"""Brief description of what the function does.
213-
213+
214214
Longer description explaining the function's purpose, behavior,
215215
and any important implementation details.
216-
216+
217217
Args:
218218
param1: Description of first parameter
219219
param2: Description of second parameter
220-
220+
221221
Returns:
222222
Description of return value
223-
223+
224224
Raises:
225225
ValueError: When parameters are invalid
226-
226+
227227
Examples:
228228
>>> # Normal usage
229229
>>> new_function("test", 42)
230230
True
231-
231+
232232
>>> # Edge case
233233
>>> new_function("", 0)
234234
False
235-
235+
236236
>>> # Error condition
237237
>>> try:
238238
... new_function("test", -1)
@@ -328,4 +328,4 @@ python -m py_compile module.py
328328
- [Development Guide](index.md) - General development information
329329
- [Testing Guide](../testing/index.md) - Testing strategies and tools
330330
- [Contributing Guidelines](https://github.com/IBM/mcp-context-forge/blob/main/CONTRIBUTING.md) - How to contribute to the project
331-
- [Makefile Targets](../../../README.md#makefile-targets) - Available make targets including doctest commands
331+
- [Makefile Targets](../../../README.md#makefile-targets) - Available make targets including doctest commands

mcpgateway/alembic/versions/b77ca9d2de7e_uuid_pk_and_slug_refactor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
import uuid
1313

1414
# Third-Party
15+
from alembic import op
1516
import sqlalchemy as sa
1617
from sqlalchemy.orm import Session
17-
from alembic import op
1818

1919
# First-Party
2020
from mcpgateway.config import settings

mcpgateway/alembic/versions/e4fc04d1a442_add_annotations_to_tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from typing import Sequence, Union
1212

1313
# Third-Party
14-
import sqlalchemy as sa
1514
from alembic import op
15+
import sqlalchemy as sa
1616

1717
# revision identifiers, used by Alembic.
1818
revision: str = "e4fc04d1a442"

mcpgateway/alembic/versions/e75490e949b1_add_improved_status_to_tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from typing import Sequence, Union
1111

1212
# Third-Party
13-
import sqlalchemy as sa
1413
from alembic import op
14+
import sqlalchemy as sa
1515

1616
# Revision identifiers.
1717
revision: str = "e75490e949b1"

mcpgateway/bootstrap_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
import logging
2626

2727
# Third-Party
28-
from sqlalchemy import create_engine, inspect
2928
from alembic import command
3029
from alembic.config import Config
30+
from sqlalchemy import create_engine, inspect
3131

3232
# First-Party
3333
from mcpgateway.config import settings

tests/e2e/test_main_apis.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,6 @@ async def test_get_version(self, client: AsyncClient):
10961096
assert response.status_code == 200
10971097
result = response.json()
10981098
assert result["app"]["version"] # non-empty
1099-
assert result["app"]["git_revision"] is not None
11001099
assert result["timestamp"] # ISO date-time string
11011100

11021101
async def test_openapi_json_requires_auth(self, client: AsyncClient):

tests/unit/mcpgateway/cache/test_session_registry.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,20 @@
2727

2828
# Standard
2929
import asyncio
30-
import sys
30+
import importlib
3131
import json
3232
import logging
3333
import re
34+
import sys
3435
from typing import Any, Dict, List
3536
from unittest.mock import AsyncMock, Mock, patch
36-
import importlib
37-
import logging
3837

3938
# Third-Party
4039
from fastapi import HTTPException
4140
import pytest
4241

4342
# First-Party
44-
from mcpgateway.cache.session_registry import SessionRegistry, SessionMessageRecord
43+
from mcpgateway.cache.session_registry import SessionMessageRecord, SessionRegistry
4544
from mcpgateway.config import settings
4645

4746

@@ -404,6 +403,7 @@ def test_redis_importerror_isolated():
404403
# if 'mcpgateway.cache.session_registry' in sys.modules:
405404
# del sys.modules['mcpgateway.cache.session_registry'] # Force re-import
406405

406+
# First-Party
407407
import mcpgateway.cache.session_registry
408408

409409
importlib.reload(mcpgateway.cache.session_registry)
@@ -431,6 +431,7 @@ def test_sqlalchemy_importerror_isolated():
431431
# if 'mcpgateway.cache.session_registry' in sys.modules:
432432
# del sys.modules['mcpgateway.cache.session_registry'] # Force re-import
433433

434+
# First-Party
434435
import mcpgateway.cache.session_registry
435436

436437
importlib.reload(mcpgateway.cache.session_registry)

0 commit comments

Comments
 (0)