chore(web): fix ruff warnings in src/ (unused imports, unsorted imports)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ from pathlib import Path
|
||||
|
||||
from quart import Blueprint, flash, g, redirect, render_template, request, session, url_for
|
||||
|
||||
from ..core import config, csrf_protect, execute, fetch_all, fetch_one
|
||||
from ..core import csrf_protect, execute, fetch_all, fetch_one
|
||||
|
||||
# Blueprint with its own template folder
|
||||
bp = Blueprint(
|
||||
|
||||
@@ -2,13 +2,20 @@
|
||||
Auth domain: magic link authentication, user management, decorators.
|
||||
"""
|
||||
import secrets
|
||||
from functools import wraps
|
||||
from datetime import datetime, timedelta
|
||||
from functools import wraps
|
||||
from pathlib import Path
|
||||
|
||||
from quart import Blueprint, render_template, request, redirect, url_for, session, flash, g
|
||||
from quart import Blueprint, flash, g, redirect, render_template, request, session, url_for
|
||||
|
||||
from ..core import config, fetch_one, fetch_all, execute, csrf_protect, waitlist_gate, capture_waitlist_email
|
||||
from ..core import (
|
||||
capture_waitlist_email,
|
||||
config,
|
||||
csrf_protect,
|
||||
execute,
|
||||
fetch_one,
|
||||
waitlist_gate,
|
||||
)
|
||||
|
||||
# Blueprint with its own template folder
|
||||
bp = Blueprint(
|
||||
|
||||
@@ -31,7 +31,7 @@ async def _serve_article(url_path: str):
|
||||
body_html = ""
|
||||
if article.get("body_template") and article.get("data_json"):
|
||||
try:
|
||||
from jinja2 import Environment, BaseLoader
|
||||
from jinja2 import BaseLoader, Environment
|
||||
data = json.loads(article["data_json"])
|
||||
env = Environment(loader=BaseLoader())
|
||||
body_html = env.from_string(article["body_template"]).render(**data)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
"""
|
||||
Public domain: landing page, marketing pages, legal pages, feedback, sitemap.
|
||||
"""
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
from quart import Blueprint, render_template, request, g, make_response
|
||||
from quart import Blueprint, g, make_response, render_template, request
|
||||
|
||||
from ..core import config, execute, fetch_all, check_rate_limit, csrf_protect
|
||||
from ..core import check_rate_limit, config, csrf_protect, execute, fetch_all
|
||||
|
||||
# Blueprint with its own template folder
|
||||
bp = Blueprint(
|
||||
|
||||
Reference in New Issue
Block a user