[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-07-29 07:25:57 +00:00
commit 59929802c0
2 changed files with 0 additions and 4 deletions

View file

@ -1180,12 +1180,10 @@ class TestIpv6Endpoint:
def test_ipv6_literal_resolves(self):
"""gethostbyname is IPv4-only and would call an AAAA-only mirror dead."""
from utils.utils import dns_host_dead
assert dns_host_dead("::1", timeout = 2.0) is False
def test_unresolvable_host_still_dead(self):
from utils.utils import dns_host_dead
assert dns_host_dead("no-such-host.invalid", timeout = 2.0) is True

View file

@ -81,7 +81,6 @@ def hf_endpoint_unreachable(timeout: int = 3, *, gateway_errors_offline: bool =
# hub here exactly as it does in the DNS shortcut, instead of probing "https://".
try:
from utils.utils import hf_endpoint_url
endpoint = hf_endpoint_url()
except Exception:
endpoint = (os.environ.get("HF_ENDPOINT") or "").strip() or "https://huggingface.co"
@ -133,7 +132,6 @@ def hf_endpoint_unreachable(timeout: int = 3, *, gateway_errors_offline: bool =
# Bounded separately so the whole probe stays within a predictable deadline.
try:
from utils.utils import hf_tcp_reachable
return not hf_tcp_reachable(min(timeout, 2.0), endpoint)
except Exception:
return True