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.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -154,6 +155,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class CommentsHandler:
"""Handle comment-related operations for WordPress"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -219,6 +220,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class CouponsHandler:
"""Handle coupon-related operations for WooCommerce"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -141,6 +142,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class CustomersHandler:
"""Handle WooCommerce customer operations"""

View File

@@ -7,6 +7,7 @@ import aiohttp
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -155,6 +156,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class MediaHandler:
"""Handle media-related operations for WordPress"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -148,6 +149,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class MenusHandler:
"""Handle menu-related operations for WordPress"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -196,6 +197,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class OrdersHandler:
"""Handle WooCommerce order-related operations"""

View File

@@ -7,12 +7,14 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def _count_words(html_content: str) -> int:
"""Strip HTML tags and count words."""
text = re.sub(r"<[^>]+>", " ", html_content)
text = re.sub(r"\s+", " ", text).strip()
return len(text.split()) if text else 0
def _strip_html(html_content: str, max_chars: int = 500) -> str:
"""Strip HTML tags and return first max_chars characters."""
text = re.sub(r"<[^>]+>", " ", html_content)
@@ -21,6 +23,7 @@ def _strip_html(html_content: str, max_chars: int = 500) -> str:
return text[:max_chars] + "..."
return text
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -454,6 +457,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class PostsHandler:
"""Handle post-related operations for WordPress"""

View File

@@ -7,12 +7,14 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def _count_words(html_content: str) -> int:
"""Strip HTML tags and count words."""
text = re.sub(r"<[^>]+>", " ", html_content)
text = re.sub(r"\s+", " ", text).strip()
return len(text.split()) if text else 0
def _strip_html(html_content: str, max_chars: int = 500) -> str:
"""Strip HTML tags and return first max_chars characters."""
text = re.sub(r"<[^>]+>", " ", html_content)
@@ -21,6 +23,7 @@ def _strip_html(html_content: str, max_chars: int = 500) -> str:
return text[:max_chars] + "..."
return text
def normalize_id_list(value: Any, field_name: str = "item") -> list[dict[str, Any]]:
"""
Convert various formats of category/tag IDs to WooCommerce API format.
@@ -100,6 +103,7 @@ def normalize_id_list(value: Any, field_name: str = "item") -> list[dict[str, An
return result
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -589,6 +593,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class ProductsHandler:
"""Handle WooCommerce product-related operations"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -86,6 +87,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class ReportsHandler:
"""Handle WooCommerce reporting operations"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -163,6 +164,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class SEOHandler:
"""Handle SEO-related operations for WordPress (Yoast SEO and RankMath)"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -69,6 +70,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class SiteHandler:
"""Handle site management operations for WordPress"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -269,6 +270,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class TaxonomyHandler:
"""Handle taxonomy-related operations for WordPress"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.client import WordPressClient
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -46,6 +47,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class UsersHandler:
"""Handle user-related operations for WordPress"""

View File

@@ -5,6 +5,7 @@ from typing import Any
from plugins.wordpress.wp_cli import WPCLIManager
def get_tool_specifications() -> list[dict[str, Any]]:
"""Return tool specifications for ToolGenerator"""
return [
@@ -183,6 +184,7 @@ def get_tool_specifications() -> list[dict[str, Any]]:
},
]
class WPCLIHandler:
"""Handle WP-CLI operations for WordPress"""