MCPcopy Create free account
hub / github.com/rthalley/dnspython / _maybe_get_resolver

Function _maybe_get_resolver

dns/asyncquery.py:516–527  ·  view source on GitHub ↗
(
    resolver: Optional["dns.asyncresolver.Resolver"],  # pyright: ignore
)

Source from the content-addressed store, hash-verified

514
515
516def _maybe_get_resolver(
517 resolver: Optional["dns.asyncresolver.Resolver"], # pyright: ignore
518) -> "dns.asyncresolver.Resolver": # pyright: ignore
519 # We need a separate method for this to avoid overriding the global
520 # variable "dns" with the as-yet undefined local variable "dns"
521 # in https().
522 if resolver is None:
523 # pylint: disable=import-outside-toplevel,redefined-outer-name
524 import dns.asyncresolver
525
526 resolver = dns.asyncresolver.Resolver()
527 return resolver
528
529
530async def https(

Callers 1

httpsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…