From 4c50f6be754c7a474c5abc2cde7412041289f754 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Fri, 13 Nov 2026 21:45:19 +0100 Subject: refactor(core): remove postponed model annotations Drop `from __future__ import annotations` now that UUID names no longer shadow the module namespace, and add coverage that mapped UUID and relationship annotations resolve correctly at runtime. Apply minor Python 3.14 syntax and formatting cleanup across tests and networking. --- webmentions_ssg/models.py | 2 -- webmentions_ssg/net.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'webmentions_ssg') diff --git a/webmentions_ssg/models.py b/webmentions_ssg/models.py index ea2de0b..622e3b8 100644 --- a/webmentions_ssg/models.py +++ b/webmentions_ssg/models.py @@ -4,8 +4,6 @@ """Define database models for users and incoming and outgoing Webmentions.""" -from __future__ import annotations - import json from datetime import UTC, datetime from enum import StrEnum diff --git a/webmentions_ssg/net.py b/webmentions_ssg/net.py index 02c7f2b..c9c2bec 100644 --- a/webmentions_ssg/net.py +++ b/webmentions_ssg/net.py @@ -256,7 +256,7 @@ def hostname_of(url: str) -> str | None: """Return a normalized URL hostname, or None for malformed URLs.""" try: hostname = urlsplit(url).hostname - except (TypeError, ValueError): + except TypeError, ValueError: return None return hostname.rstrip(".") if hostname is not None else None -- cgit v1.3.1