style: apply black and isort formatting across entire codebase
- Standardize quote style (single to double quotes) - Reorder and group imports alphabetically - Fix line breaks and indentation for consistency - Apply PEP 8 formatting standards Also updated Makefile to exclude both venv and .venv from code quality checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,11 +4,9 @@ Order management specific exceptions.
|
||||
"""
|
||||
|
||||
from typing import Optional
|
||||
from .base import (
|
||||
ResourceNotFoundException,
|
||||
ValidationException,
|
||||
BusinessLogicException
|
||||
)
|
||||
|
||||
from .base import (BusinessLogicException, ResourceNotFoundException,
|
||||
ValidationException)
|
||||
|
||||
|
||||
class OrderNotFoundException(ResourceNotFoundException):
|
||||
@@ -19,7 +17,7 @@ class OrderNotFoundException(ResourceNotFoundException):
|
||||
resource_type="Order",
|
||||
identifier=order_identifier,
|
||||
message=f"Order '{order_identifier}' not found",
|
||||
error_code="ORDER_NOT_FOUND"
|
||||
error_code="ORDER_NOT_FOUND",
|
||||
)
|
||||
|
||||
|
||||
@@ -30,7 +28,7 @@ class OrderAlreadyExistsException(ValidationException):
|
||||
super().__init__(
|
||||
message=f"Order with number '{order_number}' already exists",
|
||||
error_code="ORDER_ALREADY_EXISTS",
|
||||
details={"order_number": order_number}
|
||||
details={"order_number": order_number},
|
||||
)
|
||||
|
||||
|
||||
@@ -39,9 +37,7 @@ class OrderValidationException(ValidationException):
|
||||
|
||||
def __init__(self, message: str, details: Optional[dict] = None):
|
||||
super().__init__(
|
||||
message=message,
|
||||
error_code="ORDER_VALIDATION_FAILED",
|
||||
details=details
|
||||
message=message, error_code="ORDER_VALIDATION_FAILED", details=details
|
||||
)
|
||||
|
||||
|
||||
@@ -52,10 +48,7 @@ class InvalidOrderStatusException(BusinessLogicException):
|
||||
super().__init__(
|
||||
message=f"Cannot change order status from '{current_status}' to '{new_status}'",
|
||||
error_code="INVALID_ORDER_STATUS_CHANGE",
|
||||
details={
|
||||
"current_status": current_status,
|
||||
"new_status": new_status
|
||||
}
|
||||
details={"current_status": current_status, "new_status": new_status},
|
||||
)
|
||||
|
||||
|
||||
@@ -66,8 +59,5 @@ class OrderCannotBeCancelledException(BusinessLogicException):
|
||||
super().__init__(
|
||||
message=f"Order '{order_number}' cannot be cancelled: {reason}",
|
||||
error_code="ORDER_CANNOT_BE_CANCELLED",
|
||||
details={
|
||||
"order_number": order_number,
|
||||
"reason": reason
|
||||
}
|
||||
details={"order_number": order_number, "reason": reason},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user