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:
@@ -13,6 +13,7 @@ from typing import Any
|
||||
|
||||
from pydantic import BaseModel, Field, field_validator
|
||||
|
||||
|
||||
class SystemInfoResponse(BaseModel):
|
||||
"""Comprehensive system information"""
|
||||
|
||||
@@ -32,6 +33,7 @@ class SystemInfoResponse(BaseModel):
|
||||
active_plugins: int = Field(description="Number of active plugins")
|
||||
active_theme: str = Field(description="Active theme name")
|
||||
|
||||
|
||||
class PHPInfoResponse(BaseModel):
|
||||
"""PHP configuration details"""
|
||||
|
||||
@@ -41,6 +43,7 @@ class PHPInfoResponse(BaseModel):
|
||||
ini_settings: dict[str, str] = Field(description="Important php.ini settings")
|
||||
disabled_functions: list[str] = Field(default=[], description="Disabled PHP functions")
|
||||
|
||||
|
||||
class DiskUsageResponse(BaseModel):
|
||||
"""Disk usage statistics"""
|
||||
|
||||
@@ -55,6 +58,7 @@ class DiskUsageResponse(BaseModel):
|
||||
)
|
||||
breakdown: dict[str, float] = Field(default={}, description="Detailed breakdown by directory")
|
||||
|
||||
|
||||
class CronEvent(BaseModel):
|
||||
"""WordPress cron event information"""
|
||||
|
||||
@@ -66,6 +70,7 @@ class CronEvent(BaseModel):
|
||||
)
|
||||
args: list[Any] = Field(default=[], description="Arguments passed to the hook")
|
||||
|
||||
|
||||
class CronListResponse(BaseModel):
|
||||
"""List of all cron events"""
|
||||
|
||||
@@ -73,6 +78,7 @@ class CronListResponse(BaseModel):
|
||||
total: int = Field(description="Total number of events")
|
||||
schedules: dict[str, dict[str, Any]] = Field(default={}, description="Available cron schedules")
|
||||
|
||||
|
||||
class CronRunParams(BaseModel):
|
||||
"""Parameters for manually running a cron job"""
|
||||
|
||||
@@ -90,6 +96,7 @@ class CronRunParams(BaseModel):
|
||||
)
|
||||
return v
|
||||
|
||||
|
||||
class ErrorLogParams(BaseModel):
|
||||
"""Parameters for retrieving error log"""
|
||||
|
||||
@@ -111,6 +118,7 @@ class ErrorLogParams(BaseModel):
|
||||
raise ValueError("level must be: error, warning, notice, or fatal")
|
||||
return v.lower() if v else v
|
||||
|
||||
|
||||
class ErrorLogEntry(BaseModel):
|
||||
"""Single error log entry"""
|
||||
|
||||
@@ -120,6 +128,7 @@ class ErrorLogEntry(BaseModel):
|
||||
file: str | None = Field(default=None, description="File where error occurred")
|
||||
line: int | None = Field(default=None, description="Line number")
|
||||
|
||||
|
||||
class ErrorLogResponse(BaseModel):
|
||||
"""Error log retrieval response"""
|
||||
|
||||
@@ -128,6 +137,7 @@ class ErrorLogResponse(BaseModel):
|
||||
filtered_lines: int = Field(description="Number of entries returned")
|
||||
log_size_mb: float = Field(description="Log file size in MB")
|
||||
|
||||
|
||||
class CacheStats(BaseModel):
|
||||
"""Cache statistics"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user