mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 23:04:25 +01:00
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:
committed by
GitHub
parent
5a54d82459
commit
ae77772ea8
@@ -1,6 +1,5 @@
|
||||
import json
|
||||
import logging
|
||||
from typing import Optional
|
||||
|
||||
import pytest
|
||||
from pydantic import BaseModel
|
||||
@@ -296,7 +295,7 @@ class TestContextHandling:
|
||||
"""Test that context is optional when calling tools."""
|
||||
from mcp.server.fastmcp import Context
|
||||
|
||||
def tool_with_context(x: int, ctx: Optional[Context] = None) -> str:
|
||||
def tool_with_context(x: int, ctx: Context | None = None) -> str:
|
||||
return str(x)
|
||||
|
||||
manager = ToolManager()
|
||||
|
||||
Reference in New Issue
Block a user