summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2021-05-02 17:12:38 -0700
committerBob Halley <halley@dnspython.org>2021-05-02 17:12:38 -0700
commit2d6630c50663e9cd55d7485642bac2eda02e96a0 (patch)
tree95eba44de6c20c12dbc931e2b38935f87707b94e
parent0793435c0d680aeb7ef62d67474d56ec302580af (diff)
downloaddnspython-2d6630c50663e9cd55d7485642bac2eda02e96a0.tar.gz
Lint pass
-rw-r--r--dns/_asyncbackend.py2
-rw-r--r--dns/_asyncio_backend.py5
-rw-r--r--dns/rdata.py3
-rw-r--r--dns/rdtypes/ANY/ZONEMD.py1
-rw-r--r--dns/rdtypes/svcbbase.py2
-rw-r--r--dns/rdtypes/util.py4
-rw-r--r--dns/resolver.py1
-rw-r--r--dns/zone.py2
-rw-r--r--pylintrc1
9 files changed, 11 insertions, 10 deletions
diff --git a/dns/_asyncbackend.py b/dns/_asyncbackend.py
index 69411df..1f3a828 100644
--- a/dns/_asyncbackend.py
+++ b/dns/_asyncbackend.py
@@ -49,7 +49,7 @@ class DatagramSocket(Socket): # pragma: no cover
class StreamSocket(Socket): # pragma: no cover
- async def sendall(self, what, destination, timeout):
+ async def sendall(self, what, timeout):
raise NotImplementedError
async def recv(self, size, timeout):
diff --git a/dns/_asyncio_backend.py b/dns/_asyncio_backend.py
index 80c31dc..4c8c054 100644
--- a/dns/_asyncio_backend.py
+++ b/dns/_asyncio_backend.py
@@ -92,8 +92,8 @@ class StreamSocket(dns._asyncbackend.StreamSocket):
self.writer.write(what)
return await _maybe_wait_for(self.writer.drain(), timeout)
- async def recv(self, count, timeout):
- return await _maybe_wait_for(self.reader.read(count),
+ async def recv(self, size, timeout):
+ return await _maybe_wait_for(self.reader.read(size),
timeout)
async def close(self):
@@ -147,4 +147,3 @@ class Backend(dns._asyncbackend.Backend):
def datagram_connection_required(self):
return _is_win32
-
diff --git a/dns/rdata.py b/dns/rdata.py
index 12f3b6f..18e93cf 100644
--- a/dns/rdata.py
+++ b/dns/rdata.py
@@ -51,6 +51,8 @@ def _wordbreak(data, chunksize=_chunksize):
in range(0, len(data), chunksize)]).decode()
+# pylint: disable=unused-argument
+
def _hexify(data, chunksize=_chunksize, **kw):
"""Convert a binary string into its hex encoding, broken up into chunks
of chunksize characters separated by a space.
@@ -66,6 +68,7 @@ def _base64ify(data, chunksize=_chunksize, **kw):
return _wordbreak(base64.b64encode(data), chunksize)
+# pylint: enable=unused-argument
__escaped = b'"\\'
diff --git a/dns/rdtypes/ANY/ZONEMD.py b/dns/rdtypes/ANY/ZONEMD.py
index 0d9eedc..035f7b3 100644
--- a/dns/rdtypes/ANY/ZONEMD.py
+++ b/dns/rdtypes/ANY/ZONEMD.py
@@ -1,6 +1,5 @@
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
-import hashlib
import struct
import binascii
diff --git a/dns/rdtypes/svcbbase.py b/dns/rdtypes/svcbbase.py
index 49f35fe..2c76a58 100644
--- a/dns/rdtypes/svcbbase.py
+++ b/dns/rdtypes/svcbbase.py
@@ -448,7 +448,7 @@ class SVCBBase(dns.rdata.Rdata):
# The no-default-alpn parameter requires the alpn parameter.
if ParamKey.NO_DEFAULT_ALPN in params:
if ParamKey.ALPN not in params:
- raise ValueError(f'no-default-alpn present, but alpn missing')
+ raise ValueError('no-default-alpn present, but alpn missing')
def to_text(self, origin=None, relativize=True, **kw):
target = self.target.choose_relativity(origin, relativize)
diff --git a/dns/rdtypes/util.py b/dns/rdtypes/util.py
index 7fc08cd..1f7e821 100644
--- a/dns/rdtypes/util.py
+++ b/dns/rdtypes/util.py
@@ -225,7 +225,7 @@ def weighted_processing_order(iterable):
break
r -= weight
total -= weight
- ordered.append(rdata)
- del rdatas[n]
+ ordered.append(rdata) # pylint: disable=undefined-loop-variable
+ del rdatas[n] # pylint: disable=undefined-loop-variable
ordered.append(rdatas[0])
return ordered
diff --git a/dns/resolver.py b/dns/resolver.py
index e1de8cf..10b6ca5 100644
--- a/dns/resolver.py
+++ b/dns/resolver.py
@@ -137,7 +137,6 @@ def _errors_to_text(errors):
"""Turn a resolution errors trace into a list of text."""
texts = []
for err in errors:
- # pylint: disable=bad-continuation
texts.append('Server {} {} port {} answered {}'.format(err[0],
'TCP' if err[1] else 'UDP', err[2], err[3]))
return texts
diff --git a/dns/zone.py b/dns/zone.py
index 86f1298..65eb35b 100644
--- a/dns/zone.py
+++ b/dns/zone.py
@@ -745,7 +745,7 @@ class Zone(dns.transaction.TransactionManager):
digest.scheme)
if computed == digest.digest:
return
- except Exception as e:
+ except Exception:
pass
raise DigestVerificationFailure
diff --git a/pylintrc b/pylintrc
index 809d654..4930661 100644
--- a/pylintrc
+++ b/pylintrc
@@ -29,6 +29,7 @@ disable=
protected-access,
redefined-builtin,
too-many-lines,
+ raise-missing-from, # we should start doing this, but too noisy for now
[REPORTS]