Add strict mode to pyright (#315)

* Add strict mode to pyright

* Apply UP rule

* fix readme

* More correct

* Leave wrong Context for now

* Add strict mode to pyright

* Apply UP rule

* fix readme

* fix

* ignore
This commit is contained in:
Marcelo Trylesinski 2025-03-20 09:13:08 +00:00 • committed by GitHub
commit ae77772ea8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,11 +7,7 @@ from mcp.shared.context import RequestContext
from mcp.shared.memory import (
create_connected_server_and_client_session as create_session,
)
from mcp.types import (
ListRootsResult,
Root,
TextContent,
)
from mcp.types import ListRootsResult, Root, TextContent
@pytest.mark.anyio
@ -39,7 +35,7 @@ async def test_list_roots_callback():
return callback_return
@server.tool("test_list_roots")
async def test_list_roots(context: Context, message: str):
async def test_list_roots(context: Context, message: str): # type: ignore[reportUnknownMemberType]
roots = await context.session.list_roots()
assert roots == callback_return
return True