fix(lint): use plain comments for architecture validator codes
Some checks failed
CI / ruff (push) Failing after 7s
CI / pytest (push) Failing after 0s
CI / architecture (push) Failing after 8s
CI / dependency-scanning (push) Successful in 26s
CI / audit (push) Successful in 8s
CI / docs (push) Has been skipped

Replace # noqa: SVC-006 with # SVC-006 to avoid ruff warnings about
unknown codes. Updated architecture validators to match the new format
by checking for the code string directly instead of the noqa: prefix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 23:24:57 +01:00
parent 3a264c0a39
commit 79c985ee39
28 changed files with 43 additions and 46 deletions

View File

@@ -865,7 +865,7 @@ class LetzshopOrderService:
pass
if needs_update:
self.db.commit() # noqa: SVC-006 - background task needs incremental commits
self.db.commit() # SVC-006 - background task needs incremental commits
stats["updated"] += 1
else:
stats["skipped"] += 1
@@ -881,7 +881,7 @@ class LetzshopOrderService:
# Create new order using unified service
try:
self.create_order(store_id, shipment)
self.db.commit() # noqa: SVC-006 - background task needs incremental commits
self.db.commit() # SVC-006 - background task needs incremental commits
stats["imported"] += 1
# Decrement remaining count for batch efficiency
@@ -1093,7 +1093,7 @@ class LetzshopOrderService:
status="pending",
)
self.db.add(job)
self.db.commit() # noqa: SVC-006 - job must be visible immediately before background task starts
self.db.commit() # SVC-006 - job must be visible immediately before background task starts
self.db.refresh(job)
return job
@@ -1134,6 +1134,6 @@ class LetzshopOrderService:
)
if job:
job.celery_task_id = celery_task_id
self.db.commit() # noqa: SVC-006 - Called from API endpoint
self.db.commit() # SVC-006 - Called from API endpoint
return True
return False

View File

@@ -498,7 +498,7 @@ class LetzshopStoreSyncService:
# Create store
store = admin_service.create_store(self.db, store_data)
# Mark the Letzshop store as claimed (commits internally) # noqa: SVC-006
# Mark the Letzshop store as claimed (commits internally) # SVC-006
self.mark_store_claimed(letzshop_slug, store.id)
logger.info(

View File

@@ -446,7 +446,7 @@ class MarketplaceProductService:
InventorySummaryResponse if inventory found, None otherwise
"""
try:
# noqa: SVC-005 - Admin/internal function for inventory lookup by GTIN
# SVC-005 - Admin/internal function for inventory lookup by GTIN
inventory_entries = db.query(Inventory).filter(Inventory.gtin == gtin).all()
if not inventory_entries:
return None

View File

@@ -415,7 +415,7 @@ class PlatformSignupService:
)
subscription.stripe_customer_id = stripe_customer_id
db.commit() # noqa: SVC-006 - Atomic account creation needs commit
db.commit() # SVC-006 - Atomic account creation needs commit
# Update session
self.update_session(session_id, {
@@ -603,7 +603,7 @@ class PlatformSignupService:
if subscription:
subscription.card_collected_at = datetime.now(UTC)
subscription.stripe_payment_method_id = payment_method_id
db.commit() # noqa: SVC-006 - Finalize signup needs commit
db.commit() # SVC-006 - Finalize signup needs commit
# Get store info
store = db.query(Store).filter(Store.id == store_id).first()