Skip to content

Commit c0ee761

Browse files
author
Tapan Chugh
committed
fix pyright issues
1 parent 518b9e7 commit c0ee761

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/mcp/server/elicitation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from typing import Generic, Literal, TypeVar, Union, get_args, get_origin
88

99
from pydantic import BaseModel
10-
from pydantic.fields import FieldInfo
1110

1211
from mcp.server.session import ServerSession
1312
from mcp.types import RequestId
@@ -46,8 +45,8 @@ def _validate_elicitation_schema(schema: type[BaseModel]) -> None:
4645
for field_name, field_info in schema.model_fields.items():
4746
annotation = field_info.annotation
4847

49-
if annotation is types.NoneType:
50-
return True
48+
if annotation is None or annotation is types.NoneType:
49+
continue
5150
elif _is_primitive_field(annotation):
5251
continue
5352
elif _is_string_sequence(annotation):

0 commit comments

Comments
 (0)