Skip to content

Commit

Permalink
Merge branch 'fix/format-hostname'
Browse files Browse the repository at this point in the history
* fix/format-hostname:
  Allow single label hostname in format string
  • Loading branch information
Julian committed Sep 20, 2023
2 parents dd5dd20 + fa91642 commit 047ac37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsonschema/_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def is_ipv6(instance: object) -> bool:
def is_host_name(instance: object) -> bool:
if not isinstance(instance, str):
return True
return FQDN(instance).is_valid
return FQDN(instance, min_labels=1).is_valid


with suppress(ImportError):
Expand Down

0 comments on commit 047ac37

Please sign in to comment.