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,13 +4,10 @@ Vendor domain management specific exceptions.
|
||||
"""
|
||||
|
||||
from typing import Any, Dict, Optional
|
||||
from .base import (
|
||||
ResourceNotFoundException,
|
||||
ConflictException,
|
||||
ValidationException,
|
||||
BusinessLogicException,
|
||||
ExternalServiceException
|
||||
)
|
||||
|
||||
from .base import (BusinessLogicException, ConflictException,
|
||||
ExternalServiceException, ResourceNotFoundException,
|
||||
ValidationException)
|
||||
|
||||
|
||||
class VendorDomainNotFoundException(ResourceNotFoundException):
|
||||
@@ -64,10 +61,7 @@ class ReservedDomainException(ValidationException):
|
||||
super().__init__(
|
||||
message=f"Domain cannot use reserved subdomain: {reserved_part}",
|
||||
field="domain",
|
||||
details={
|
||||
"domain": domain,
|
||||
"reserved_part": reserved_part
|
||||
},
|
||||
details={"domain": domain, "reserved_part": reserved_part},
|
||||
)
|
||||
self.error_code = "RESERVED_DOMAIN"
|
||||
|
||||
@@ -79,10 +73,7 @@ class DomainNotVerifiedException(BusinessLogicException):
|
||||
super().__init__(
|
||||
message=f"Domain '{domain}' must be verified before activation",
|
||||
error_code="DOMAIN_NOT_VERIFIED",
|
||||
details={
|
||||
"domain_id": domain_id,
|
||||
"domain": domain
|
||||
},
|
||||
details={"domain_id": domain_id, "domain": domain},
|
||||
)
|
||||
|
||||
|
||||
@@ -93,10 +84,7 @@ class DomainVerificationFailedException(BusinessLogicException):
|
||||
super().__init__(
|
||||
message=f"Domain verification failed for '{domain}': {reason}",
|
||||
error_code="DOMAIN_VERIFICATION_FAILED",
|
||||
details={
|
||||
"domain": domain,
|
||||
"reason": reason
|
||||
},
|
||||
details={"domain": domain, "reason": reason},
|
||||
)
|
||||
|
||||
|
||||
@@ -107,10 +95,7 @@ class DomainAlreadyVerifiedException(BusinessLogicException):
|
||||
super().__init__(
|
||||
message=f"Domain '{domain}' is already verified",
|
||||
error_code="DOMAIN_ALREADY_VERIFIED",
|
||||
details={
|
||||
"domain_id": domain_id,
|
||||
"domain": domain
|
||||
},
|
||||
details={"domain_id": domain_id, "domain": domain},
|
||||
)
|
||||
|
||||
|
||||
@@ -133,10 +118,7 @@ class DNSVerificationException(ExternalServiceException):
|
||||
service_name="DNS",
|
||||
message=f"DNS verification failed for '{domain}': {reason}",
|
||||
error_code="DNS_VERIFICATION_ERROR",
|
||||
details={
|
||||
"domain": domain,
|
||||
"reason": reason
|
||||
},
|
||||
details={"domain": domain, "reason": reason},
|
||||
)
|
||||
|
||||
|
||||
@@ -147,10 +129,7 @@ class MaxDomainsReachedException(BusinessLogicException):
|
||||
super().__init__(
|
||||
message=f"Maximum number of domains reached ({max_domains})",
|
||||
error_code="MAX_DOMAINS_REACHED",
|
||||
details={
|
||||
"vendor_id": vendor_id,
|
||||
"max_domains": max_domains
|
||||
},
|
||||
details={"vendor_id": vendor_id, "max_domains": max_domains},
|
||||
)
|
||||
|
||||
|
||||
@@ -161,8 +140,5 @@ class UnauthorizedDomainAccessException(BusinessLogicException):
|
||||
super().__init__(
|
||||
message=f"Unauthorized access to domain {domain_id}",
|
||||
error_code="UNAUTHORIZED_DOMAIN_ACCESS",
|
||||
details={
|
||||
"domain_id": domain_id,
|
||||
"vendor_id": vendor_id
|
||||
},
|
||||
details={"domain_id": domain_id, "vendor_id": vendor_id},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user