aboutsummaryrefslogtreecommitdiff
path: root/blog
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2025-03-15 14:26:37 +0100
committeralexpdp7 <alex@corcoles.net>2025-03-15 14:27:17 +0100
commitb8c97576fd44045ad7edf26afb51740f61840a8e (patch)
treeb475ab01d0e4835fbbd38630300784e298cce612 /blog
parent8eb7a03402cfee23f7686a53f7bdabddddd09ee5 (diff)
Apply more ruff fixes
Diffstat (limited to 'blog')
-rw-r--r--blog/src/blog/__init__.py4
-rw-r--r--blog/src/blog/__main__.py4
-rw-r--r--blog/src/blog/blog_pages.py3
3 files changed, 2 insertions, 9 deletions
diff --git a/blog/src/blog/__init__.py b/blog/src/blog/__init__.py
index 5417f13d..3d2c4224 100644
--- a/blog/src/blog/__init__.py
+++ b/blog/src/blog/__init__.py
@@ -2,12 +2,10 @@ import importlib.resources
import re
import bicephalus
-
import htmlgenerator as h
from blog import blog_pages, gemtext, html, page, pretty
-
STATIC = importlib.resources.files("static").iterdir().__next__().parent
@@ -47,7 +45,7 @@ class SimplePage(page.BasePage):
)
-def handler(request: bicephalus.Request) -> bicephalus.Response:
+def handler(request: bicephalus.Request) -> bicephalus.Response: # noqa: PLR0911
if not request.path.endswith("/"):
return bicephalus.Response(
request.path + "/", None, bicephalus.Status.PERMANENT_REDIRECTION
diff --git a/blog/src/blog/__main__.py b/blog/src/blog/__main__.py
index 4bbcec54..9d1ed9e2 100644
--- a/blog/src/blog/__main__.py
+++ b/blog/src/blog/__main__.py
@@ -3,11 +3,9 @@ import logging
import sys
from bicephalus import main as bicephalus_main
-from bicephalus import otel
-from bicephalus import ssl
+from bicephalus import otel, ssl
import blog
-
from blog import meta
diff --git a/blog/src/blog/blog_pages.py b/blog/src/blog/blog_pages.py
index 64a91540..a7d71c7e 100644
--- a/blog/src/blog/blog_pages.py
+++ b/blog/src/blog/blog_pages.py
@@ -5,14 +5,11 @@ import pathlib
import textwrap
import bicephalus
-
import htmlgenerator as h
-
from feedgen import feed
from blog import gemtext, html, meta, page, pretty
-
CONTENT = importlib.resources.files("content").iterdir().__next__().parent