From: Bob Halley Date: Tue, 19 May 2020 12:51:31 +0000 (-0700) Subject: linting X-Git-Tag: v2.0.0rc1~196^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=886b1357128d9edde5b58b54ffcb4bf73c99cb99;p=thirdparty%2Fdnspython.git linting --- diff --git a/dns/inet.py b/dns/inet.py index 254b5d07..f5b1fcb3 100644 --- a/dns/inet.py +++ b/dns/inet.py @@ -138,4 +138,4 @@ def is_address(text): dns.ipv6.inet_aton(text, True) return True except Exception: - raise False + return False diff --git a/dns/resolver.py b/dns/resolver.py index 474219a0..30b554d0 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -522,6 +522,18 @@ class _Resolution(object): self.tcp = tcp self.raise_on_no_answer = raise_on_no_answer self.nxdomain_responses = {} + # + # Initialize other things to help analysis tools + self.qname = dns.name.empty + self.nameservers = [] + self.current_nameservers = [] + self.errors = [] + self.nameserver = None + self.port = 0 + self.tcp_attempt = False + self.retry_with_tcp = False + self.request = None + self.backoff = 0 def next_request(self): """Get the next request to send, and check the cache. diff --git a/dns/trio/query.py b/dns/trio/query.py index b4be84f9..0fc60584 100644 --- a/dns/trio/query.py +++ b/dns/trio/query.py @@ -140,6 +140,8 @@ async def udp(q, where, port=53, source=None, source_port=0, r.time = received_time - sent_time return r +# pylint: disable=redefined-outer-name + async def send_stream(stream, what): """Asynchronously send a DNS message to the specified stream.