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:
@@ -41,7 +41,7 @@ Route Configuration:
|
||||
|
||||
import importlib
|
||||
import logging
|
||||
from dataclasses import dataclass, field
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
@@ -176,12 +176,12 @@ def _discover_routes_in_dir(
|
||||
"store": {
|
||||
"api_prefix": "/api/v1/store",
|
||||
"pages_prefix": "/store",
|
||||
"include_in_schema": True if route_type == "api" else False,
|
||||
"include_in_schema": route_type == "api",
|
||||
},
|
||||
"storefront": {
|
||||
"api_prefix": "/api/v1/storefront",
|
||||
"pages_prefix": "/storefront",
|
||||
"include_in_schema": True if route_type == "api" else False,
|
||||
"include_in_schema": route_type == "api",
|
||||
},
|
||||
"platform": {
|
||||
"api_prefix": "/api/v1/platform",
|
||||
@@ -247,10 +247,7 @@ def _discover_routes_in_dir(
|
||||
prefix = config["pages_prefix"]
|
||||
|
||||
# Build tags - use custom tags if provided, otherwise default
|
||||
if custom_tags:
|
||||
tags = custom_tags
|
||||
else:
|
||||
tags = [f"{frontend}-{module_code}"]
|
||||
tags = custom_tags if custom_tags else [f"{frontend}-{module_code}"]
|
||||
|
||||
route_info = RouteInfo(
|
||||
router=router,
|
||||
|
||||
Reference in New Issue
Block a user