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:
@@ -9,9 +9,10 @@ Usage:
|
||||
python scripts/letzshop_introspect.py YOUR_API_KEY
|
||||
"""
|
||||
|
||||
import sys
|
||||
import requests
|
||||
import json
|
||||
import sys
|
||||
|
||||
import requests
|
||||
|
||||
ENDPOINT = "https://letzshop.lu/graphql"
|
||||
|
||||
@@ -227,10 +228,9 @@ def format_type(type_info: dict) -> str:
|
||||
|
||||
if kind == "NON_NULL":
|
||||
return f"{format_type(of_type)}!"
|
||||
elif kind == "LIST":
|
||||
if kind == "LIST":
|
||||
return f"[{format_type(of_type)}]"
|
||||
else:
|
||||
return name or kind
|
||||
return name or kind
|
||||
|
||||
|
||||
def print_fields(type_data: dict, highlight_terms: list[str] = None):
|
||||
@@ -490,7 +490,7 @@ def test_shipment_query(api_key: str, state: str = "unconfirmed"):
|
||||
result = run_query(api_key, query)
|
||||
|
||||
if "errors" in result:
|
||||
print(f"\n❌ QUERY FAILED!")
|
||||
print("\n❌ QUERY FAILED!")
|
||||
print(f"Errors: {json.dumps(result['errors'], indent=2)}")
|
||||
return False
|
||||
|
||||
@@ -503,7 +503,7 @@ def test_shipment_query(api_key: str, state: str = "unconfirmed"):
|
||||
order = shipment.get("order", {})
|
||||
units = shipment.get("inventoryUnits", [])
|
||||
|
||||
print(f"\nExample shipment:")
|
||||
print("\nExample shipment:")
|
||||
print(f" Shipment #: {shipment.get('number')}")
|
||||
print(f" Order #: {order.get('number')}")
|
||||
print(f" Customer: {order.get('email')}")
|
||||
|
||||
Reference in New Issue
Block a user