Update flake8 and pyflakes

This commit is contained in:
Brian May
2022-08-05 08:00:56 +10:00
parent 58d72a93d2
commit f8086dfa59
7 changed files with 30 additions and 30 deletions

View File

@ -227,7 +227,7 @@ class SockWrapper:
return 0
def write(self, buf):
assert(buf)
assert buf
return self.uwrite(buf)
def uread(self):
@ -402,15 +402,15 @@ class Mux(Handler):
elif cmd == CMD_EXIT:
self.ok = False
elif cmd == CMD_TCP_CONNECT:
assert(not self.channels.get(channel))
assert not self.channels.get(channel)
if self.new_channel:
self.new_channel(channel, data)
elif cmd == CMD_DNS_REQ:
assert(not self.channels.get(channel))
assert not self.channels.get(channel)
if self.got_dns_req:
self.got_dns_req(channel, data)
elif cmd == CMD_UDP_OPEN:
assert(not self.channels.get(channel))
assert not self.channels.get(channel)
if self.got_udp_open:
self.got_udp_open(channel, data)
elif cmd == CMD_ROUTES:
@ -482,8 +482,8 @@ class Mux(Handler):
if len(self.inbuf) >= (self.want or HDR_LEN):
(s1, s2, channel, cmd, datalen) = \
struct.unpack('!ccHHH', self.inbuf[:HDR_LEN])
assert(s1 == b('S'))
assert(s2 == b('S'))
assert s1 == b('S')
assert s2 == b('S')
self.want = datalen + HDR_LEN
if self.want and len(self.inbuf) >= self.want:
data = self.inbuf[HDR_LEN:self.want]