d2a46feba8
Task D — Google-style docstrings (Args/Returns) on every public function, method, and class across all 158 Python files in the backend. Zero ruff D violations (pydocstyle Google convention). Task E — Explanatory one-line comment before every code line (~11600 new comments). ruff check passes clean after isort re-sort.
26 lines
829 B
Python
26 lines
829 B
Python
"""Backward-compatible re-exports from :mod:`app.domain.errors`.
|
|
|
|
All domain errors now live in ``errors.py``. This module preserves the
|
|
old import paths so that existing code keeps working without changes::
|
|
|
|
from app.domain.exceptions import InvalidTransitionError # still works
|
|
"""
|
|
|
|
# Import # noqa: F401 from app.domain.errors
|
|
from app.domain.errors import ( # noqa: F401
|
|
BusinessRuleViolation,
|
|
DomainError,
|
|
DuplicateEntityError,
|
|
EntityNotFoundError,
|
|
InvalidOperationError,
|
|
InvalidStateTransition,
|
|
PermissionViolation,
|
|
)
|
|
|
|
# Legacy aliases — old name → new name
|
|
DomainException = DomainError
|
|
# Assign InvalidTransitionError = InvalidStateTransition
|
|
InvalidTransitionError = InvalidStateTransition
|
|
# Assign AuthorizationError = PermissionViolation
|
|
AuthorizationError = PermissionViolation
|