Skip to content

Commit d04ba8c

Browse files
committed
fix: Add explicit type check
1 parent 97b156d commit d04ba8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp/server/elicitation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _is_primitive_field(annotation: type) -> bool:
101101
)
102102

103103
# Handle Enum types
104-
if issubclass(annotation, str) and issubclass(annotation, Enum):
104+
if isinstance(annotation, type) and issubclass(annotation, str) and issubclass(annotation, Enum): # type: ignore[arg-type]
105105
return True
106106

107107
return False

0 commit comments

Comments
 (0)