From f128cb3d045ef277a6e6b876effdc5ac64c14d12 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 4 Dec 2024 16:32:23 -0500 Subject: [PATCH] Implement Host.is_hostname() --- lib/nntp/tiny/host.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nntp/tiny/host.py b/lib/nntp/tiny/host.py index 29eb2c7..f4eede5 100644 --- a/lib/nntp/tiny/host.py +++ b/lib/nntp/tiny/host.py @@ -20,3 +20,7 @@ class Host(): return False return True + + @staticmethod + def is_hostname(value: str): + return not (Host.is_ipv6(value) and Host.is_ipv4(value))