fix(ci): fix black/ruff failures, add CoC and PR template
- Fix Python formatting (sync no longer strips blank lines from .py files) - Remove test_community_build.py (tests private sync module) - Fix ruff warnings in test files - Add CODE_OF_CONDUCT.md - Add .github/PULL_REQUEST_TEMPLATE.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ToolDefinition(BaseModel):
|
||||
"""
|
||||
Type-safe tool definition.
|
||||
@@ -42,6 +43,7 @@ class ToolDefinition(BaseModel):
|
||||
|
||||
model_config = ConfigDict(arbitrary_types_allowed=True) # Allow Callable type
|
||||
|
||||
|
||||
class ToolRegistry:
|
||||
"""
|
||||
Central registry for all MCP tools.
|
||||
@@ -208,9 +210,11 @@ class ToolRegistry:
|
||||
counts_str = ", ".join(f"{k}: {v}" for k, v in counts.items())
|
||||
return f"ToolRegistry(total={self.get_count()}, {counts_str})"
|
||||
|
||||
|
||||
# Singleton instance
|
||||
_tool_registry: ToolRegistry | None = None
|
||||
|
||||
|
||||
def get_tool_registry() -> ToolRegistry:
|
||||
"""
|
||||
Get the singleton tool registry instance.
|
||||
|
||||
Reference in New Issue
Block a user