import base64
import socket
import struct
-import sys
import time
import dns.asyncbackend
import time
import base64
-from dns.dnssectypes import *
+from dns.dnssectypes import Algorithm, DSDigest, NSEC3Hash
import dns.exception
import dns.name
"""
-from typing import Dict, Optional, Set
+from typing import Optional, Set
class DNSException(Exception):
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
import collections.abc
-import sys
from dns._immutable_ctx import immutable
if isinstance(f, str):
f = stack.enter_context(open(f))
return from_text(f, idna_codec, one_rr_per_rrset)
- assert False # for mypy
+ assert False # for mypy lgtm[py/unreachable-statement]
def make_query(qname, rdtype, rdclass=dns.rdataclass.IN, use_edns=None,
"""DNS Names.
"""
-from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
+from typing import Dict, Iterable, Optional, Tuple, Union
import copy
import struct
"""DNS nodes. A node is a set of rdatasets."""
-from typing import List, Optional, Union
+from typing import List, Optional
import enum
import io
import selectors
import socket
import struct
-import sys
import time
import urllib.parse
if not q.is_response(r):
raise BadResponse
return r
- assert False # help mypy figure out we can't get here
+ assert False # help mypy figure out we can't get here lgtm[py/unreachable-statement]
def udp_with_fallback(q: dns.message.Message, where: str, timeout: Optional[float]=None, port=53,
source: Optional[str]=None, source_port=0,
if not q.is_response(r):
raise BadResponse
return r
- assert False # help mypy figure out we can't get here
+ assert False # help mypy figure out we can't get here lgtm[py/unreachable-statement]
def _tls_handshake(s, expiration):
if not q.is_response(r):
raise BadResponse
return r
- assert False # help mypy figure out we can't get here
+ assert False # help mypy figure out we can't get here lgtm[py/unreachable-statement]
def xfr(where, zone, rdtype=dns.rdatatype.AXFR, rdclass=dns.rdataclass.IN,
timeout=None, port=53, keyring=None, keyname=None, relativize=True,
"""DNS rdatasets (an rdataset is a set of rdatas of a given type and class)"""
-from typing import Any, cast, Collection, Dict, List, Optional, Union
+from typing import Any, cast, Collection, List, Optional, Union
import io
import random
"""DNS stub resolver."""
-from typing import Any, Dict, List, Optional, Tuple, Union
+from typing import Dict, List, Optional, Tuple, Union
from urllib.parse import urlparse
import contextlib
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import itertools
-import sys
class Set:
"""A place to store TSIG keys."""
-from typing import Any, Dict, Union
+from typing import Any, Dict
import base64
from typing import Any, Dict, Iterator, List, Optional, Set, Tuple, Union
import contextlib
-import hashlib
import io
import os
import struct
f = stack.enter_context(open(f))
return from_text(f, origin, rdclass, relativize, zone_factory,
filename, allow_include, check_origin)
- assert False # make mypy happy
+ assert False # make mypy happy lgtm[py/unreachable-statement]
def from_xfr(xfr, zone_factory=Zone, relativize=True, check_origin=True):