Repository navigation
Commit 723770d
Raed Lazreg
fix: import ContentBlock under TYPE_CHECKING to avoid circular import
exceptions.py is imported during mcp package init (before mcp.types is
registered), so a top-level 'from mcp.types import ContentBlock' fails with
ModuleNotFoundError. content is only used as an annotation, so guard the
import with TYPE_CHECKING and add 'from __future__ import annotations'.1 parent 411b164 commit 723770d
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
4 | 12 | | |
5 | 13 | | |
6 | 14 | | |
| |||
0 commit comments