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:
@@ -12,6 +12,7 @@ from typing import Any
|
||||
|
||||
from pydantic import BaseModel, Field, field_validator
|
||||
|
||||
|
||||
class DatabaseExportParams(BaseModel):
|
||||
"""Parameters for database export"""
|
||||
|
||||
@@ -33,6 +34,7 @@ class DatabaseExportParams(BaseModel):
|
||||
raise ValueError(f"Invalid table name: {table}")
|
||||
return v
|
||||
|
||||
|
||||
class DatabaseImportParams(BaseModel):
|
||||
"""Parameters for database import"""
|
||||
|
||||
@@ -50,6 +52,7 @@ class DatabaseImportParams(BaseModel):
|
||||
raise ValueError("URL must start with http:// or https://")
|
||||
return v
|
||||
|
||||
|
||||
class DatabaseBackupParams(BaseModel):
|
||||
"""Parameters for creating database backup"""
|
||||
|
||||
@@ -61,6 +64,7 @@ class DatabaseBackupParams(BaseModel):
|
||||
default=False, description="Also backup wp-content/uploads directory"
|
||||
)
|
||||
|
||||
|
||||
class DatabaseRestoreParams(BaseModel):
|
||||
"""Parameters for restoring database"""
|
||||
|
||||
@@ -78,6 +82,7 @@ class DatabaseRestoreParams(BaseModel):
|
||||
raise ValueError("Confirmation required: set confirm=true")
|
||||
return v
|
||||
|
||||
|
||||
class DatabaseSearchParams(BaseModel):
|
||||
"""Parameters for searching database"""
|
||||
|
||||
@@ -91,6 +96,7 @@ class DatabaseSearchParams(BaseModel):
|
||||
case_sensitive: bool = Field(default=False, description="Case-sensitive search")
|
||||
max_results: int = Field(default=100, ge=1, le=1000, description="Maximum results to return")
|
||||
|
||||
|
||||
class DatabaseQueryParams(BaseModel):
|
||||
"""Parameters for executing SQL query"""
|
||||
|
||||
@@ -136,6 +142,7 @@ class DatabaseQueryParams(BaseModel):
|
||||
|
||||
return v
|
||||
|
||||
|
||||
class DatabaseSizeResponse(BaseModel):
|
||||
"""Response model for database size information"""
|
||||
|
||||
@@ -143,6 +150,7 @@ class DatabaseSizeResponse(BaseModel):
|
||||
tables: list[dict[str, Any]] = Field(description="List of tables with size information")
|
||||
row_count: int = Field(description="Total row count across all tables")
|
||||
|
||||
|
||||
class DatabaseTableInfo(BaseModel):
|
||||
"""Information about a database table"""
|
||||
|
||||
@@ -154,6 +162,7 @@ class DatabaseTableInfo(BaseModel):
|
||||
total_size_mb: float
|
||||
collation: str
|
||||
|
||||
|
||||
class DatabaseRepairResult(BaseModel):
|
||||
"""Result of database repair operation"""
|
||||
|
||||
@@ -161,6 +170,7 @@ class DatabaseRepairResult(BaseModel):
|
||||
status: str # 'OK', 'Repaired', 'Failed'
|
||||
message: str | None = None
|
||||
|
||||
|
||||
class DatabaseBackupInfo(BaseModel):
|
||||
"""Information about a database backup"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user