diff options
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/models.py | 2 | ||||
| -rw-r--r-- | webmentions_ssg/net.py | 2 |
2 files changed, 1 insertions, 3 deletions
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 |
