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.n8n.client import N8nClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -132,6 +133,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
async def list_projects(client: N8nClient, limit: int = 100, cursor: str | None = None) -> str:
try:
response = await client.list_projects(limit=limit, cursor=cursor)
@@ -146,6 +148,7 @@ async def list_projects(client: N8nClient, limit: int = 100, cursor: str | None
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2)
async def get_project(client: N8nClient, project_id: str) -> str:
try:
project = await client.get_project(project_id)
@@ -156,6 +159,7 @@ async def get_project(client: N8nClient, project_id: str) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2)
async def create_project(client: N8nClient, name: str) -> str:
try:
project = await client.create_project(name)
@@ -170,6 +174,7 @@ async def create_project(client: N8nClient, name: str) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2)
async def update_project(client: N8nClient, project_id: str, name: str) -> str:
try:
project = await client.update_project(project_id, name)
@@ -184,6 +189,7 @@ async def update_project(client: N8nClient, project_id: str, name: str) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2)
async def delete_project(client: N8nClient, project_id: str) -> str:
try:
await client.delete_project(project_id)
@@ -191,6 +197,7 @@ async def delete_project(client: N8nClient, project_id: str) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2)
async def add_project_users(client: N8nClient, project_id: str, users: list[dict[str, str]]) -> str:
try:
relations = [{"userId": u["user_id"], "role": u["role"]} for u in users]
@@ -202,6 +209,7 @@ async def add_project_users(client: N8nClient, project_id: str, users: list[dict
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2)
async def change_project_user_role(
client: N8nClient, project_id: str, user_id: str, role: str
) -> str:
@@ -217,6 +225,7 @@ async def change_project_user_role(
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2)
async def remove_project_user(client: N8nClient, project_id: str, user_id: str) -> str:
try:
await client.remove_project_user(project_id, user_id)