Commit 877db76
committed
fix: add type annotations to fix Pyright errors
ROOT CAUSE:
Pyright reported 8 type errors about partially unknown types in list operations
and dictionary assignments. The issues were:
- skip_names list type inference
- direct_args dict type inference
- param.default type casting
CHANGES:
- Added explicit type annotation `skip_names: list[str]` in tools/base.py
- Added explicit type annotation `skip_names: list[str]` in prompts/base.py
- Added explicit type annotation `direct_args: dict[str, Any]` in tools/base.py
- Added type ignore comment for param.default assignment in dependencies.py
IMPACT:
- Fixes all 8 Pyright type errors
- CI pre-commit hook will now pass
- Type safety improved with explicit annotations
Refs: #20811 parent 4ca7742 commit 877db76
File tree
3 files changed
+4
-4
lines changed- src/mcp/server/mcpserver
- prompts
- tools
- utilities
3 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
0 commit comments