Commit 4f2942e
Jay Hemnani
fix: add explicit type annotation for call_tool decorator
Replace `Callable[..., Awaitable[...]]` with a concrete `CallToolHandler`
type alias that specifies the exact expected function signature
`(str, dict[str, Any]) -> Awaitable[...]`.
This enables static type checkers (mypy/pyright) to validate decorated
functions without requiring `# type: ignore` comments, making the
`py.typed` marker actually useful.
Fixes #1822
Github-Issue: #18221 parent c7cbfbb commit 4f2942e
1 file changed
+9
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
497 | 505 | | |
498 | 506 | | |
499 | 507 | | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
| 508 | + | |
512 | 509 | | |
513 | 510 | | |
514 | 511 | | |
| |||
0 commit comments