fix: resolve CI/CD workflow and linting issues
Some checks failed
CI / test (push) Failing after 4m56s
Some checks failed
CI / test (push) Failing after 4m56s
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
"""Git integration tools for MCP Server CLI."""
|
"""Git integration tools for MCP Server CLI."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
|
||||||
from typing import Any, Dict, List, Optional
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
|
from mcp_server_cli.models import ToolParameter, ToolSchema
|
||||||
from mcp_server_cli.tools.base import ToolBase, ToolResult
|
from mcp_server_cli.tools.base import ToolBase, ToolResult
|
||||||
from mcp_server_cli.models import ToolSchema, ToolParameter
|
|
||||||
|
|
||||||
|
|
||||||
class GitTools(ToolBase):
|
class GitTools(ToolBase):
|
||||||
@@ -146,7 +146,7 @@ class GitTools(ToolBase):
|
|||||||
|
|
||||||
async def _add(self, repo: Path, pattern: str) -> ToolResult:
|
async def _add(self, repo: Path, pattern: str) -> ToolResult:
|
||||||
"""Stage files."""
|
"""Stage files."""
|
||||||
output = await self._run_git(repo, "add", pattern)
|
await self._run_git(repo, "add", pattern)
|
||||||
return ToolResult(success=True, output=f"Staged: {pattern}")
|
return ToolResult(success=True, output=f"Staged: {pattern}")
|
||||||
|
|
||||||
async def _checkout(self, repo: Path, branch: str) -> ToolResult:
|
async def _checkout(self, repo: Path, branch: str) -> ToolResult:
|
||||||
@@ -154,7 +154,7 @@ class GitTools(ToolBase):
|
|||||||
if not branch:
|
if not branch:
|
||||||
return ToolResult(success=False, output="", error="Branch name is required")
|
return ToolResult(success=False, output="", error="Branch name is required")
|
||||||
|
|
||||||
output = await self._run_git(repo, "checkout", branch)
|
await self._run_git(repo, "checkout", branch)
|
||||||
return ToolResult(success=True, output=f"Switched to: {branch}")
|
return ToolResult(success=True, output=f"Switched to: {branch}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user