Commit 2cf6608
Fix send_command return type annotation to include MCPResponse
The send_command method can return either dict[str, Any] or MCPResponse,
but the return type annotation only declared dict[str, Any]. This causes
type-checking inconsistencies when the method returns MCPResponse on
line 279-284 (when Unity is reloading).
Changes:
- Update return type from `-> dict[str, Any]` to `-> dict[str, Any] | MCPResponse`
- Applied to both Server/ and MCPForUnity/ versions
- Ensures static type checkers recognize MCPResponse as valid return value
Addresses CodeRabbit feedback:
- #360 (comment)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 448be09 commit 2cf6608
File tree
2 files changed
+2
-2
lines changed- MCPForUnity/UnityMcpServer~/src
- Server
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
0 commit comments