Skip to content

Commit e4dbf71

Browse files
committed
Fix pyright error in test_elicitation.py
Add None check for requestedSchema before accessing properties to fix type narrowing error that was blocking CI.
1 parent 19cb01c commit e4dbf71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/server/fastmcp/test_elicitation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ async def defaults_tool(ctx: Context[ServerSession, None]) -> str:
242242
async def callback_schema_verify(context: RequestContext[ClientSession, None], params: ElicitRequestParams):
243243
# Verify the schema includes defaults
244244
schema = params.requestedSchema
245+
assert schema is not None, "Schema should not be None for form mode elicitation"
245246
props = schema["properties"]
246247

247248
assert props["name"]["default"] == "Guest"

0 commit comments

Comments
 (0)