[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
5c9b82e024
commit
59929802c0
2 changed files with 0 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue