Flake8 fixes

This commit is contained in:
Andrew Godwin 2016-04-04 03:38:38 +02:00
parent 67e3e55131
commit 37923c3674
4 changed files with 11 additions and 7 deletions

View File

@ -141,7 +141,7 @@ class Route(object):
"""
Returns the channel names this route listens on
"""
return {self.channel,}
return {self.channel, }
def __str__(self):
return "%s %s -> %s" % (

View File

@ -1 +1 @@
from .base import ChannelTestCase
from .base import ChannelTestCase # NOQA isort:skip

View File

@ -212,8 +212,10 @@ class RequestTests(ChannelTestCase):
"content": b"re=fou",
"more_content": True,
})
class VeryImpatientRequest(AsgiRequest):
body_receive_timeout = 0
with self.assertRaises(RequestTimeout):
VeryImpatientRequest(self.get_next_message("test"))

View File

@ -12,7 +12,7 @@ import os.path
import sys
### Transforms: Turn one content string into another ###
# Transforms: Turn one content string into another
class Replacement(object):
"""
@ -45,10 +45,10 @@ class Insert(object):
if self.after:
return value[:match.end()] + self.to_insert + value[match.end():]
else:
return value[:match.start()] + self.to_insert + value[match.start():]
return value[:match.start()] + self.to_insert + value[match.start():]
### Operations: Copy or patch files ###
# Operations: Copy or patch files
class FileMap(object):
"""
@ -98,7 +98,7 @@ class NewFile(object):
fh.write(self.content)
### Main class ###
# Main class and config
global_transforms = [
@ -154,7 +154,9 @@ class Patchinator(object):
"channels/worker.py", "django/channels/worker.py", global_transforms,
),
FileMap(
"channels/management/commands/runworker.py", "django/core/management/commands/runworker.py", global_transforms,
"channels/management/commands/runworker.py",
"django/core/management/commands/runworker.py",
global_transforms,
),
# Tests
FileMap(