Skip to content

Commit dccc953

Browse files
fix: add type annotation to fix pyright error
1 parent 2355058 commit dccc953

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/snippets/servers/tool_errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def read_config(path: str) -> str:
3333
@mcp.tool()
3434
def validate_input(data: str) -> CallToolResult:
3535
"""Validate input data."""
36-
errors = []
36+
errors: list[str] = []
3737
if len(data) < 3:
3838
errors.append("Input must be at least 3 characters")
3939
if not data.isascii():

0 commit comments

Comments
 (0)