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:
airano
2026-02-17 18:19:39 +03:30
parent c9083d86b1
commit c73e39f6e4
135 changed files with 1185 additions and 317 deletions

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.openpanel.client import OpenPanelClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator (6 tools)"""
return [
@@ -112,10 +113,12 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
# =====================
# Client Functions (6)
# =====================
async def list_clients(client: OpenPanelClient, project_id: str) -> str:
"""List all API clients"""
try:
@@ -132,6 +135,7 @@ async def list_clients(client: OpenPanelClient, project_id: str) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def get_client(client: OpenPanelClient, project_id: str, client_id: str) -> str:
"""Get API client details"""
try:
@@ -149,6 +153,7 @@ async def get_client(client: OpenPanelClient, project_id: str, client_id: str) -
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def create_client(
client: OpenPanelClient,
project_id: str,
@@ -181,6 +186,7 @@ async def create_client(
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def delete_client(client: OpenPanelClient, project_id: str, client_id: str) -> str:
"""Delete an API client"""
try:
@@ -199,6 +205,7 @@ async def delete_client(client: OpenPanelClient, project_id: str, client_id: str
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def regenerate_client_secret(client: OpenPanelClient, project_id: str, client_id: str) -> str:
"""Regenerate client secret"""
try:
@@ -217,6 +224,7 @@ async def regenerate_client_secret(client: OpenPanelClient, project_id: str, cli
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def update_client_mode(
client: OpenPanelClient,
project_id: str,