Skip to content

Commit 258a215

Browse files
committed
style: move UNSUPPORTED_PROTOCOL_VERSION_ERROR_CODE to top of types.py
1 parent 140ebe9 commit 258a215

4 files changed

Lines changed: 8 additions & 12 deletions

File tree

packages/toolbox-core/src/toolbox_core/mcp_transport/v20241105/types.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
from pydantic import BaseModel, ConfigDict, Field
1919

20+
UNSUPPORTED_PROTOCOL_VERSION_ERROR_CODE = -32022
21+
2022

2123
class _BaseMCPModel(BaseModel):
2224
"""Base model with common configuration."""
@@ -55,9 +57,6 @@ class ErrorData(_BaseMCPModel):
5557
data: Any | None = None
5658

5759

58-
UNSUPPORTED_PROTOCOL_VERSION_ERROR_CODE = -32022
59-
60-
6160
class JSONRPCError(_BaseMCPModel):
6261
jsonrpc: Literal["2.0"]
6362
id: str | int

packages/toolbox-core/src/toolbox_core/mcp_transport/v20250326/types.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
from pydantic import BaseModel, ConfigDict, Field
1919

20+
UNSUPPORTED_PROTOCOL_VERSION_ERROR_CODE = -32022
21+
2022

2123
class _BaseMCPModel(BaseModel):
2224
"""Base model with common configuration."""
@@ -55,9 +57,6 @@ class ErrorData(_BaseMCPModel):
5557
data: Any | None = None
5658

5759

58-
UNSUPPORTED_PROTOCOL_VERSION_ERROR_CODE = -32022
59-
60-
6160
class JSONRPCError(_BaseMCPModel):
6261
jsonrpc: Literal["2.0"]
6362
id: str | int

packages/toolbox-core/src/toolbox_core/mcp_transport/v20250618/types.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
from pydantic import BaseModel, ConfigDict, Field
1919

20+
UNSUPPORTED_PROTOCOL_VERSION_ERROR_CODE = -32022
21+
2022

2123
class _BaseMCPModel(BaseModel):
2224
"""Base model with common configuration."""
@@ -55,9 +57,6 @@ class ErrorData(_BaseMCPModel):
5557
data: Any | None = None
5658

5759

58-
UNSUPPORTED_PROTOCOL_VERSION_ERROR_CODE = -32022
59-
60-
6160
class JSONRPCError(_BaseMCPModel):
6261
jsonrpc: Literal["2.0"]
6362
id: str | int

packages/toolbox-core/src/toolbox_core/mcp_transport/v20251125/types.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
from pydantic import BaseModel, ConfigDict, Field
1919

20+
UNSUPPORTED_PROTOCOL_VERSION_ERROR_CODE = -32022
21+
2022

2123
class _BaseMCPModel(BaseModel):
2224
"""Base model with common configuration."""
@@ -55,9 +57,6 @@ class ErrorData(_BaseMCPModel):
5557
data: Any | None = None
5658

5759

58-
UNSUPPORTED_PROTOCOL_VERSION_ERROR_CODE = -32022
59-
60-
6160
class JSONRPCError(_BaseMCPModel):
6261
jsonrpc: Literal["2.0"]
6362
id: str | int

0 commit comments

Comments
 (0)