]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
LGTM lint
authorBob Halley <halley@dnspython.org>
Sun, 6 Mar 2022 18:08:45 +0000 (10:08 -0800)
committerBob Halley <halley@dnspython.org>
Sun, 6 Mar 2022 18:08:45 +0000 (10:08 -0800)
13 files changed:
dns/asyncquery.py
dns/dnssec.py
dns/exception.py
dns/immutable.py
dns/message.py
dns/name.py
dns/node.py
dns/query.py
dns/rdataset.py
dns/resolver.py
dns/set.py
dns/tsigkeyring.py
dns/zone.py

index 3ac48dc33836c6a0115866c65a0f1f7389731ac6..950624a14d28b07c48a382d8a3412f361aea3fe0 100644 (file)
@@ -22,7 +22,6 @@ from typing import Any, Dict, Optional, Tuple, Union
 import base64
 import socket
 import struct
-import sys
 import time
 
 import dns.asyncbackend
index bb20005e6ea804a4a5251c186ff0ea016260c558..810d12de8640aae37aa8e80a744ff88e019c3128 100644 (file)
@@ -24,7 +24,7 @@ import struct
 import time
 import base64
 
-from dns.dnssectypes import *
+from dns.dnssectypes import Algorithm, DSDigest, NSEC3Hash
 
 import dns.exception
 import dns.name
index 550a1bcfcdd1e1b4102f7aa3bf6f79643f9d1127..941c7a5f966a7a577a358ce2a65b2134d05c52e4 100644 (file)
@@ -22,7 +22,7 @@ always be subclasses of ``DNSException``.
 """
 
 
-from typing import Dict, Optional, Set
+from typing import Optional, Set
 
 
 class DNSException(Exception):
index 17515b1f7e43d86e0383a4ec395da2be52f8ea30..20da7d902f5ada69574c72f668808cd288519fcc 100644 (file)
@@ -1,7 +1,6 @@
 # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
 
 import collections.abc
-import sys
 
 from dns._immutable_ctx import immutable
 
index 46c0a684b307c465ec42dd8c3cb5f491b988c93b..ec429fdcdbe35b9ff013c3878630a71e712274cd 100644 (file)
@@ -1449,7 +1449,7 @@ def from_file(f, idna_codec=None, one_rr_per_rrset=False) -> Message:
         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,
index 29078eede887d3c92d531e280bec17326e49d606..04fa27283fbfaa853d2f8d1f55febb7cde481eb2 100644 (file)
@@ -18,7 +18,7 @@
 """DNS Names.
 """
 
-from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
+from typing import Dict, Iterable, Optional, Tuple, Union
 
 import copy
 import struct
index a4c17f966ea074a031d67fbc63a151e4948bbe85..de017b432233ceed95df445cb2b0f5f2d73644f7 100644 (file)
@@ -17,7 +17,7 @@
 
 """DNS nodes.  A node is a set of rdatasets."""
 
-from typing import List, Optional, Union
+from typing import List, Optional
 
 import enum
 import io
index 9588621b98a9b91d3c0245c3152ec72a139ff577..4757be8a26bde0a1fb83ef4fe3cff3687e51274a 100644 (file)
@@ -27,7 +27,6 @@ import os
 import selectors
 import socket
 import struct
-import sys
 import time
 import urllib.parse
 
@@ -586,7 +585,7 @@ def udp(q: dns.message.Message, where: str, timeout: Optional[float]=None, port=
         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,
@@ -812,7 +811,7 @@ def tcp(q: dns.message.Message, where: str, timeout: Optional[float]=None, port=
         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):
@@ -907,7 +906,7 @@ def tls(q: dns.message.Message, where: str, timeout: Optional[float]=None,
         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,
index 218adba3e696fa28c0661a383066791c6ef1681d..33bee2f196b9d68ce2edc05d0b1fede71f793a94 100644 (file)
@@ -17,7 +17,7 @@
 
 """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
index 42d228d9a7a6b08de0ff147b60430ec1a045a094..5f0f3628f6f850847757052f3c49d24f30686193 100644 (file)
@@ -17,7 +17,7 @@
 
 """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
index 40583549800f603a25ed080e89400bafa9028dcb..faf968fa1b9591f65f0539f54b81436f69868cbf 100644 (file)
@@ -16,7 +16,6 @@
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 import itertools
-import sys
 
 
 class Set:
index 06a1bd09af2db4837040515f1adcceb04bb2d268..ed1179420e8a7fbe4abee0dbcc1f9b86155950d3 100644 (file)
@@ -17,7 +17,7 @@
 
 """A place to store TSIG keys."""
 
-from typing import Any, Dict, Union
+from typing import Any, Dict
 
 import base64
 
index 7ab9e9dee8eb13b88b3cacd9142940a1714a5140..a1fe07a90f60e767991878edabdc8347704e5d10 100644 (file)
@@ -20,7 +20,6 @@
 from typing import Any, Dict, Iterator, List, Optional, Set, Tuple, Union
 
 import contextlib
-import hashlib
 import io
 import os
 import struct
@@ -1198,7 +1197,7 @@ def from_file(f: Any, origin: Optional[Union[dns.name.Name, str]]=None,
             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):