fix(lint): pin ruff version, add pre-commit hook, fix all lint errors
Some checks failed
Some checks failed
- Pin ruff==0.8.4 in requirements-dev.txt (was >=0.8.4, CI got newer version with different import sorting rules) - Add ruff to .pre-commit-config.yaml with --fix to auto-sort imports on commit (prevents PyCharm import reordering from reaching CI) - Fix I001 import sorting in 6 files - Fix F401 unused import (sqlalchemy.Numeric in subscription.py) - Fix noqa false positive in validate_architecture.py comment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,10 @@ from sqlalchemy.orm import Session
|
||||
from app.modules.catalog.models import Product # IMPORT-002
|
||||
from app.modules.customers.models.customer import Customer # IMPORT-002
|
||||
from app.modules.inventory.models import Inventory # IMPORT-002
|
||||
from app.modules.marketplace.models import MarketplaceImportJob, MarketplaceProduct # IMPORT-002
|
||||
from app.modules.marketplace.models import ( # IMPORT-002
|
||||
MarketplaceImportJob,
|
||||
MarketplaceProduct,
|
||||
)
|
||||
from app.modules.orders.models import Order # IMPORT-002
|
||||
from app.modules.tenancy.exceptions import (
|
||||
AdminOperationException,
|
||||
|
||||
@@ -22,7 +22,6 @@ from sqlalchemy import (
|
||||
ForeignKey,
|
||||
Index,
|
||||
Integer,
|
||||
Numeric,
|
||||
String,
|
||||
Text,
|
||||
)
|
||||
|
||||
@@ -21,8 +21,6 @@ from app.modules.billing.schemas.billing import (
|
||||
CancelRequest,
|
||||
CancelResponse,
|
||||
CategoryListResponse,
|
||||
ChangeTierRequest as BillingChangeTierRequest,
|
||||
ChangeTierResponse as BillingChangeTierResponse,
|
||||
# Checkout & Portal schemas
|
||||
CheckoutRequest,
|
||||
CheckoutResponse,
|
||||
@@ -56,12 +54,18 @@ from app.modules.billing.schemas.billing import (
|
||||
SubscriptionTierListResponse,
|
||||
SubscriptionTierResponse,
|
||||
SubscriptionTierUpdate,
|
||||
TierListResponse,
|
||||
TierResponse,
|
||||
# Subscription Tier Admin schemas
|
||||
TierFeatureLimitEntry,
|
||||
TierListResponse,
|
||||
TierResponse,
|
||||
UpcomingInvoiceResponse,
|
||||
)
|
||||
from app.modules.billing.schemas.billing import (
|
||||
ChangeTierRequest as BillingChangeTierRequest,
|
||||
)
|
||||
from app.modules.billing.schemas.billing import (
|
||||
ChangeTierResponse as BillingChangeTierResponse,
|
||||
)
|
||||
from app.modules.billing.schemas.subscription import (
|
||||
ChangeTierRequest,
|
||||
ChangeTierResponse,
|
||||
|
||||
@@ -32,7 +32,10 @@ from app.modules.messaging.exceptions import (
|
||||
ConversationClosedException,
|
||||
ConversationNotFoundException,
|
||||
)
|
||||
from app.modules.messaging.models.message import ConversationType, ParticipantType # API-007
|
||||
from app.modules.messaging.models.message import ( # API-007
|
||||
ConversationType,
|
||||
ParticipantType,
|
||||
)
|
||||
from app.modules.messaging.schemas import (
|
||||
ConversationDetailResponse,
|
||||
ConversationListResponse,
|
||||
|
||||
@@ -5,10 +5,9 @@ Monitoring module database models.
|
||||
Provides monitoring-related models including capacity snapshots.
|
||||
"""
|
||||
|
||||
from app.modules.monitoring.models.capacity_snapshot import CapacitySnapshot
|
||||
|
||||
# Admin notification and logging models
|
||||
from app.modules.messaging.models import AdminNotification
|
||||
from app.modules.monitoring.models.capacity_snapshot import CapacitySnapshot
|
||||
from app.modules.tenancy.models import PlatformAlert
|
||||
|
||||
__all__ = [
|
||||
|
||||
@@ -9,14 +9,14 @@ from app.modules.monitoring.services.admin_audit_service import (
|
||||
AdminAuditService,
|
||||
admin_audit_service,
|
||||
)
|
||||
from app.modules.monitoring.services.capacity_forecast_service import (
|
||||
CapacityForecastService,
|
||||
capacity_forecast_service,
|
||||
)
|
||||
from app.modules.monitoring.services.background_tasks_service import (
|
||||
BackgroundTasksService,
|
||||
background_tasks_service,
|
||||
)
|
||||
from app.modules.monitoring.services.capacity_forecast_service import (
|
||||
CapacityForecastService,
|
||||
capacity_forecast_service,
|
||||
)
|
||||
from app.modules.monitoring.services.log_service import (
|
||||
LogService,
|
||||
log_service,
|
||||
|
||||
Reference in New Issue
Block a user