lint: Un-skip a few rules
This commit is contained in:
parent
f7a7026c8b
commit
3d9ae0e375
4
.flake8
4
.flake8
|
@ -2,8 +2,6 @@
|
|||
exclude = .git,.tox,__pycache__,.eggs,build
|
||||
max-line-length = 100
|
||||
ignore =
|
||||
# E231 missing whitespace after ','
|
||||
E231,
|
||||
# E265 block comment should start with '# '
|
||||
E265,
|
||||
# E266 too many leading '#' for block comment
|
||||
|
@ -12,5 +10,3 @@ ignore =
|
|||
E402,
|
||||
# E722 do not use bare except
|
||||
E722,
|
||||
# E741 ambiguous variable name 'l'
|
||||
E741,
|
||||
|
|
|
@ -14,7 +14,8 @@ define('dump', default=False, help='print template generated code and exit')
|
|||
|
||||
context = {
|
||||
'page_title': 'mitsuhiko\'s benchmark',
|
||||
'table': [dict(a=1,b=2,c=3,d=4,e=5,f=6,g=7,h=8,i=9,j=10) for x in range(1000)]
|
||||
'table': [dict(a=1, b=2, c=3, d=4, e=5,
|
||||
f=6, g=7, h=8, i=9, j=10) for x in range(1000)]
|
||||
}
|
||||
|
||||
tmpl = Template("""\
|
||||
|
|
|
@ -51,7 +51,7 @@ if __name__ == "__main__":
|
|||
for sig in [signal.SIGTERM, signal.SIGTERM, signal.SIGKILL]:
|
||||
os.kill(proc.pid, sig)
|
||||
res = os.waitpid(proc.pid, os.WNOHANG)
|
||||
if res != (0,0):
|
||||
if res != (0, 0):
|
||||
break
|
||||
time.sleep(0.1)
|
||||
else:
|
||||
|
|
|
@ -1021,7 +1021,7 @@ class GenCoroutineTest(AsyncTestCase):
|
|||
self.finished = True
|
||||
|
||||
@skipNotCPython
|
||||
@unittest.skipIf((3,) < sys.version_info < (3,6),
|
||||
@unittest.skipIf((3,) < sys.version_info < (3, 6),
|
||||
"asyncio.Future has reference cycles")
|
||||
def test_coroutine_refcounting(self):
|
||||
# On CPython, tasks and their arguments should be released immediately
|
||||
|
|
|
@ -757,17 +757,17 @@ class WebSocketProtocol13(WebSocketProtocol):
|
|||
else:
|
||||
finbit = 0
|
||||
frame = struct.pack("B", finbit | opcode | flags)
|
||||
l = len(data)
|
||||
data_len = len(data)
|
||||
if self.mask_outgoing:
|
||||
mask_bit = 0x80
|
||||
else:
|
||||
mask_bit = 0
|
||||
if l < 126:
|
||||
frame += struct.pack("B", l | mask_bit)
|
||||
elif l <= 0xFFFF:
|
||||
frame += struct.pack("!BH", 126 | mask_bit, l)
|
||||
if data_len < 126:
|
||||
frame += struct.pack("B", data_len | mask_bit)
|
||||
elif data_len <= 0xFFFF:
|
||||
frame += struct.pack("!BH", 126 | mask_bit, data_len)
|
||||
else:
|
||||
frame += struct.pack("!BQ", 127 | mask_bit, l)
|
||||
frame += struct.pack("!BQ", 127 | mask_bit, data_len)
|
||||
if self.mask_outgoing:
|
||||
mask = os.urandom(4)
|
||||
data = mask + _websocket_mask(mask, data)
|
||||
|
|
Loading…
Reference in New Issue