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:
@@ -24,6 +24,7 @@ from pydantic import BaseModel, ConfigDict, Field, ValidationInfo, field_validat
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SiteConfig(BaseModel):
|
||||
"""
|
||||
Type-safe site configuration.
|
||||
@@ -104,6 +105,7 @@ class SiteConfig(BaseModel):
|
||||
"""
|
||||
return self.model_dump()
|
||||
|
||||
|
||||
class SiteManager:
|
||||
"""
|
||||
Manage site configurations with type safety.
|
||||
@@ -519,9 +521,11 @@ class SiteManager:
|
||||
counts_str = ", ".join(f"{k}: {v}" for k, v in counts.items())
|
||||
return f"SiteManager(total={self.get_count()}, {counts_str})"
|
||||
|
||||
|
||||
# Singleton instance
|
||||
_site_manager: SiteManager | None = None
|
||||
|
||||
|
||||
def get_site_manager() -> SiteManager:
|
||||
"""
|
||||
Get the singleton site manager instance.
|
||||
|
||||
Reference in New Issue
Block a user