From a10b29ac98ba535a5c2f9697c54265edd2c84a78 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 12 Nov 2026 22:56:07 +0100 Subject: refactor(core): use lowercase extension names Rename shared Flask extension singletons to conventional lowercase names and update imports throughout the application and tests to remove redundant aliases. --- webmentions_ssg/views/endpoint.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'webmentions_ssg/views/endpoint.py') diff --git a/webmentions_ssg/views/endpoint.py b/webmentions_ssg/views/endpoint.py index baab397..91bb881 100644 --- a/webmentions_ssg/views/endpoint.py +++ b/webmentions_ssg/views/endpoint.py @@ -15,8 +15,7 @@ from flask.typing import ResponseReturnValue from sqlalchemy.engine import CursorResult from .. import forms -from ..extensions import CSRF, LIMITER -from ..extensions import DATABASE as db +from ..extensions import csrf, db, limiter from ..models import ReceivedWebmention, received_url_digest from ..tasks.receiver import verify_webmention from . import root_page @@ -92,12 +91,12 @@ def submit_received(source: str, target: str) -> tuple[uuid.UUID, bool] | None: @root_page.post("/endpoint") -@LIMITER.limit( +@limiter.limit( lambda: current_app.config["ENDPOINT_GLOBAL_RATE_LIMIT"], key_func=lambda: "all-clients", ) -@LIMITER.limit(lambda: current_app.config["ENDPOINT_RATE_LIMIT"]) -@CSRF.exempt +@limiter.limit(lambda: current_app.config["ENDPOINT_RATE_LIMIT"]) +@csrf.exempt def endpoint() -> ResponseReturnValue: """Receive and queue a Webmention for verification. -- cgit v1.3.1