Skip to content

Commit 2672932

Browse files
committed
Add linters
Signed-off-by: Mihai Criveti <[email protected]>
1 parent 951c66a commit 2672932

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ jobs:
5757
- id: ruff
5858
setup: pip install ruff
5959
cmd: |
60-
ruff check .
61-
ruff format --check .
60+
ruff check mcpgateway
6261
6362
# - id: pylint
6463
# setup: pip install pylint

tests/unit/mcpgateway/test_wrapper.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,22 @@ def __init__(self, name: str):
5050

5151
# decorator helpers just hand the coroutine straight back
5252
def list_tools(self):
53-
return lambda fn: fn # noqa: E704
53+
return lambda fn: fn
5454

5555
def call_tool(self):
56-
return lambda fn: fn # noqa: E704
56+
return lambda fn: fn
5757

5858
def list_resources(self):
59-
return lambda fn: fn # noqa: E704
59+
return lambda fn: fn
6060

6161
def read_resource(self):
62-
return lambda fn: fn # noqa: E704
62+
return lambda fn: fn
6363

6464
def list_prompts(self):
65-
return lambda fn: fn # noqa: E704
65+
return lambda fn: fn
6666

6767
def get_prompt(self):
68-
return lambda fn: fn # noqa: E704
68+
return lambda fn: fn
6969

7070
def get_capabilities(self, **_): # used by wrapper
7171
return {}
@@ -494,10 +494,10 @@ async def _meta(_ids):
494494
@pytest.mark.asyncio
495495
async def test_handle_list_prompts(monkeypatch, wrapper):
496496
async def _ids(_):
497-
return ["p1"] # noqa: E704
497+
return ["p1"]
498498

499499
async def _meta(_):
500-
return [{"name": "Hello", "description": "", "arguments": []}] # noqa: E704
500+
return [{"name": "Hello", "description": "", "arguments": []}]
501501

502502
monkeypatch.setattr(wrapper, "get_prompts_from_mcp_server", _ids)
503503
monkeypatch.setattr(wrapper, "prompts_metadata", _meta)

0 commit comments

Comments
 (0)