fix(lint): resolve all ruff E402/F401/F841/I001 errors
- Move logger= after imports in planner/routes.py and setup_paddle.py - Add # noqa: E402 to intentional post-setup imports (app.py, core.py, migrate.py, test_supervisor.py) - Fix unused cursor variables (test_noindex.py) → _ - Move stray csv import to top of test_outreach.py - Auto-sort import blocks (test_email_templates, test_noindex, test_outreach) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ from .core import (
|
||||
)
|
||||
|
||||
setup_logging()
|
||||
from .i18n import LANG_BLUEPRINTS, SUPPORTED_LANGS, get_country_name, get_translations
|
||||
from .i18n import LANG_BLUEPRINTS, SUPPORTED_LANGS, get_country_name, get_translations # noqa: E402
|
||||
|
||||
_ASSET_VERSION = str(int(time.time()))
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ from dotenv import load_dotenv
|
||||
# These calls run synchronously on the event loop thread; a shorter cap limits stalls.
|
||||
_RESEND_TIMEOUT_SECONDS = 10
|
||||
resend.default_http_client = resend.RequestsClient(timeout=_RESEND_TIMEOUT_SECONDS)
|
||||
from quart import g, make_response, render_template, request, session
|
||||
from quart import g, make_response, render_template, request, session # noqa: E402
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent))
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from dotenv import load_dotenv # noqa: E402
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ import logging
|
||||
import math
|
||||
from pathlib import Path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
from quart import Blueprint, Response, g, jsonify, render_template, request
|
||||
|
||||
from ..auth.routes import login_required
|
||||
@@ -25,6 +23,8 @@ from ..core import (
|
||||
from ..i18n import get_translations
|
||||
from .calculator import COUNTRY_CURRENCY, CURRENCY_DEFAULT, calc, validate_state
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
bp = Blueprint(
|
||||
"planner",
|
||||
__name__,
|
||||
|
||||
@@ -14,8 +14,6 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
from paddle_billing import Client as PaddleClient
|
||||
from paddle_billing import Environment, Options
|
||||
from paddle_billing.Entities.Events.EventTypeName import EventTypeName
|
||||
@@ -28,6 +26,8 @@ from paddle_billing.Resources.Prices.Operations import CreatePrice
|
||||
from paddle_billing.Resources.Products.Operations import CreateProduct, ListProducts
|
||||
from paddle_billing.Resources.Products.Operations.List.Includes import Includes
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
load_dotenv()
|
||||
|
||||
PADDLE_API_KEY = os.getenv("PADDLE_API_KEY", "")
|
||||
|
||||
Reference in New Issue
Block a user