routes: fix ruff formatting

This commit is contained in:
Username
2026-02-18 08:47:53 +01:00
parent c69290af2d
commit ca1cbd6e73

View File

@@ -1053,9 +1053,7 @@ class IndexView(MethodView):
g.rate_limit_reset = reset_timestamp
if not allowed:
current_app.logger.warning(
"Rate limit exceeded: ip=%s", client_ip
)
current_app.logger.warning("Rate limit exceeded: ip=%s", client_ip)
# Audit log rate limit event
if current_app.config.get("AUDIT_ENABLED", True):
from app.audit import AuditEvent, AuditOutcome, log_event
@@ -2007,9 +2005,7 @@ class ShortURLCreateView(MethodView):
if not allowed:
record_rate_limit("blocked")
retry_after = max(1, reset_timestamp - int(time.time()))
response = error_response(
"Rate limit exceeded", 429, retry_after=retry_after
)
response = error_response("Rate limit exceeded", 429, retry_after=retry_after)
response.headers["Retry-After"] = str(retry_after)
add_rate_limit_headers(response, 0, limit, reset_timestamp)
return response