The docstring/default should refer to httpx, not requests, and the
callers should use it rather than providing alternate (and different)
strings.
"""
if not have_doh:
- raise NoDOH("httpx is not available.") # pragma: no cover
+ raise NoDOH # pragma: no cover
if client and not isinstance(client, httpx.AsyncClient):
raise ValueError("session parameter must be an httpx.AsyncClient")
class NoDOH(dns.exception.DNSException):
- """DNS over HTTPS (DOH) was requested but the requests module is not
+ """DNS over HTTPS (DOH) was requested but the httpx module is not
available."""
"""
if not have_doh:
- raise NoDOH("DNS-over-HTTPS is not available.") # pragma: no cover
+ raise NoDOH # pragma: no cover
if session and not isinstance(session, httpx.Client):
raise ValueError("session parameter must be an httpx.Client")