fix(lint): auto-fix ruff violations and tune lint rules
- Auto-fixed 4,496 lint issues (import sorting, modern syntax, etc.) - Added ignore rules for patterns intentional in this codebase: E402 (late imports), E712 (SQLAlchemy filters), B904 (raise from), SIM108/SIM105/SIM117 (readability preferences) - Added per-file ignores for tests and scripts - Excluded broken scripts/rename_terminology.py (has curly quotes) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,16 +16,11 @@ import uuid
|
||||
|
||||
import pytest
|
||||
|
||||
from app.exceptions import ValidationException
|
||||
from app.modules.marketplace.exceptions import (
|
||||
InvalidMarketplaceProductDataException,
|
||||
MarketplaceProductNotFoundException,
|
||||
MarketplaceProductValidationException,
|
||||
)
|
||||
from app.modules.marketplace.services.marketplace_product_service import (
|
||||
MarketplaceProductService,
|
||||
marketplace_product_service,
|
||||
)
|
||||
from app.modules.marketplace.models import (
|
||||
MarketplaceProduct,
|
||||
MarketplaceProductTranslation,
|
||||
@@ -34,6 +29,10 @@ from app.modules.marketplace.schemas import (
|
||||
MarketplaceProductCreate,
|
||||
MarketplaceProductUpdate,
|
||||
)
|
||||
from app.modules.marketplace.services.marketplace_product_service import (
|
||||
MarketplaceProductService,
|
||||
marketplace_product_service,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
|
||||
@@ -15,8 +15,12 @@ from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from app.modules.marketplace.models import (
|
||||
OnboardingStatus,
|
||||
OnboardingStep,
|
||||
StoreOnboarding,
|
||||
)
|
||||
from app.modules.marketplace.services.onboarding_service import OnboardingService
|
||||
from app.modules.marketplace.models import OnboardingStatus, OnboardingStep, StoreOnboarding
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@@ -525,7 +529,9 @@ class TestOnboardingServiceStep4:
|
||||
|
||||
def test_complete_order_sync_raises_for_missing_job(self, db, test_store):
|
||||
"""Test complete_order_sync raises for non-existent job"""
|
||||
from app.modules.marketplace.exceptions import OnboardingSyncJobNotFoundException
|
||||
from app.modules.marketplace.exceptions import (
|
||||
OnboardingSyncJobNotFoundException,
|
||||
)
|
||||
|
||||
onboarding = StoreOnboarding(
|
||||
store_id=test_store.id,
|
||||
@@ -550,7 +556,9 @@ class TestOnboardingServiceStep4:
|
||||
|
||||
def test_complete_order_sync_raises_if_not_complete(self, db, test_store):
|
||||
"""Test complete_order_sync raises if job still running"""
|
||||
from app.modules.marketplace.exceptions import OnboardingSyncNotCompleteException
|
||||
from app.modules.marketplace.exceptions import (
|
||||
OnboardingSyncNotCompleteException,
|
||||
)
|
||||
|
||||
onboarding = StoreOnboarding(
|
||||
store_id=test_store.id,
|
||||
|
||||
@@ -7,11 +7,13 @@ from app.modules.marketplace.exceptions import (
|
||||
MarketplaceProductNotFoundException,
|
||||
MarketplaceProductValidationException,
|
||||
)
|
||||
from app.modules.marketplace.services.marketplace_product_service import MarketplaceProductService
|
||||
from app.modules.marketplace.schemas import (
|
||||
MarketplaceProductCreate,
|
||||
MarketplaceProductUpdate,
|
||||
)
|
||||
from app.modules.marketplace.services.marketplace_product_service import (
|
||||
MarketplaceProductService,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
|
||||
Reference in New Issue
Block a user