Skip to content

Commit 047ac37

Browse files
committed
Merge branch 'fix/format-hostname'
* fix/format-hostname: Allow single label hostname in format string
2 parents dd5dd20 + fa91642 commit 047ac37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonschema/_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def is_ipv6(instance: object) -> bool:
274274
def is_host_name(instance: object) -> bool:
275275
if not isinstance(instance, str):
276276
return True
277-
return FQDN(instance).is_valid
277+
return FQDN(instance, min_labels=1).is_valid
278278

279279

280280
with suppress(ImportError):

0 commit comments

Comments
 (0)