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):
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):
def datagram_connection_required(self):
return _is_win32
-
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.
return _wordbreak(base64.b64encode(data), chunksize)
+# pylint: enable=unused-argument
__escaped = b'"\\'
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
-import hashlib
import struct
import binascii
# 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)
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
"""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
digest.scheme)
if computed == digest.digest:
return
- except Exception as e:
+ except Exception:
pass
raise DigestVerificationFailure
protected-access,
redefined-builtin,
too-many-lines,
+ raise-missing-from, # we should start doing this, but too noisy for now
[REPORTS]