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.supabase.client import SupabaseClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator (14 tools)"""
return [
@@ -281,10 +282,12 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
# =====================
# Auth Operations (14 tools)
# =====================
async def list_users(client: SupabaseClient, page: int = 1, per_page: int = 50) -> str:
"""List all users with pagination"""
try:
@@ -307,6 +310,7 @@ async def list_users(client: SupabaseClient, page: int = 1, per_page: int = 50)
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def get_user(client: SupabaseClient, user_id: str) -> str:
"""Get user by ID"""
try:
@@ -316,6 +320,7 @@ async def get_user(client: SupabaseClient, user_id: str) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def create_user(
client: SupabaseClient,
email: str,
@@ -344,6 +349,7 @@ async def create_user(
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def update_user(
client: SupabaseClient,
user_id: str,
@@ -376,6 +382,7 @@ async def update_user(
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def delete_user(client: SupabaseClient, user_id: str) -> str:
"""Delete a user"""
try:
@@ -389,6 +396,7 @@ async def delete_user(client: SupabaseClient, user_id: str) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def invite_user(
client: SupabaseClient,
email: str,
@@ -409,6 +417,7 @@ async def invite_user(
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def generate_link(
client: SupabaseClient, email: str, link_type: str = "magiclink", redirect_to: str | None = None
) -> str:
@@ -426,6 +435,7 @@ async def generate_link(
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def ban_user(client: SupabaseClient, user_id: str, duration: str = "none") -> str:
"""Ban a user"""
try:
@@ -439,6 +449,7 @@ async def ban_user(client: SupabaseClient, user_id: str, duration: str = "none")
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def unban_user(client: SupabaseClient, user_id: str) -> str:
"""Unban a user"""
try:
@@ -452,6 +463,7 @@ async def unban_user(client: SupabaseClient, user_id: str) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def list_user_factors(client: SupabaseClient, user_id: str) -> str:
"""List user MFA factors"""
try:
@@ -463,6 +475,7 @@ async def list_user_factors(client: SupabaseClient, user_id: str) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def delete_user_factor(client: SupabaseClient, user_id: str, factor_id: str) -> str:
"""Delete an MFA factor"""
try:
@@ -476,6 +489,7 @@ async def delete_user_factor(client: SupabaseClient, user_id: str, factor_id: st
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def get_auth_config(client: SupabaseClient) -> str:
"""Get auth configuration"""
try:
@@ -486,6 +500,7 @@ async def get_auth_config(client: SupabaseClient) -> str:
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def search_users(
client: SupabaseClient, query: str, page: int = 1, per_page: int = 50
) -> str:
@@ -515,6 +530,7 @@ async def search_users(
except Exception as e:
return json.dumps({"success": False, "error": str(e)}, indent=2, ensure_ascii=False)
async def get_user_by_email(client: SupabaseClient, email: str) -> str:
"""Find user by email"""
try: