mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Formatting
This commit is contained in:
@@ -651,9 +651,7 @@ def _validate_compatibility(compatibility: str | None) -> None:
|
||||
ValueError: If the value exceeds the maximum allowed length.
|
||||
"""
|
||||
if compatibility is not None and len(compatibility) > MAX_COMPATIBILITY_LENGTH:
|
||||
raise ValueError(
|
||||
f"Skill compatibility must be {MAX_COMPATIBILITY_LENGTH} characters or fewer."
|
||||
)
|
||||
raise ValueError(f"Skill compatibility must be {MAX_COMPATIBILITY_LENGTH} characters or fewer.")
|
||||
|
||||
|
||||
def _build_skill_content(
|
||||
@@ -733,6 +731,7 @@ class InlineSkill(Skill):
|
||||
instructions="Use this skill for DB tasks.",
|
||||
)
|
||||
|
||||
|
||||
@skill.resource
|
||||
def get_schema() -> str:
|
||||
return "CREATE TABLE ..."
|
||||
@@ -2613,11 +2612,7 @@ class FileSkillsSource(SkillsSource):
|
||||
|
||||
# Reject absolute paths (check both POSIX and Windows-style roots
|
||||
# so validation is consistent regardless of the host OS)
|
||||
if (
|
||||
os.path.isabs(directory)
|
||||
or normalized.startswith("/")
|
||||
or re.match(r"^[A-Za-z]:[/\\]", directory)
|
||||
):
|
||||
if os.path.isabs(directory) or normalized.startswith("/") or re.match(r"^[A-Za-z]:[/\\]", directory):
|
||||
logger.warning(
|
||||
"Skipping directory '%s': absolute paths are not allowed.",
|
||||
directory,
|
||||
|
||||
@@ -4227,9 +4227,7 @@ async def test_mcp_tool_call_tool_forwards_tool_list_meta():
|
||||
self.session.call_tool = AsyncMock(
|
||||
return_value=types.CallToolResult(content=[types.TextContent(type="text", text="result")])
|
||||
)
|
||||
self.session.list_prompts = AsyncMock(
|
||||
return_value=types.ListPromptsResult(prompts=[])
|
||||
)
|
||||
self.session.list_prompts = AsyncMock(return_value=types.ListPromptsResult(prompts=[]))
|
||||
|
||||
def get_mcp_client(self) -> _AsyncGeneratorContextManager[Any, None]:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user