Skip to content

Commit 35637d3

Browse files
committed
refactor: use Field with default_factory for mutable default in TagsResponse
1 parent 8681361 commit 35637d3

File tree

1 file changed

+2
-1
lines changed
  • MCPForUnity/UnityMcpServer~/src/resources

1 file changed

+2
-1
lines changed

MCPForUnity/UnityMcpServer~/src/resources/tags.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
from pydantic import Field
12
from models import MCPResponse
23
from registry import mcp_for_unity_resource
34
from unity_connection import async_send_command_with_retry
45

56

67
class TagsResponse(MCPResponse):
78
"""List of all tags in the project."""
8-
data: list[str] = []
9+
data: list[str] = Field(default_factory=list)
910

1011

1112
@mcp_for_unity_resource(

0 commit comments

Comments
 (0)