mirror of
https://github.com/django/daphne.git
synced 2025-04-21 01:02:06 +03:00
Flake8 fixes
This commit is contained in:
parent
67e3e55131
commit
37923c3674
|
@ -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" % (
|
||||
|
|
|
@ -1 +1 @@
|
|||
from .base import ChannelTestCase
|
||||
from .base import ChannelTestCase # NOQA isort:skip
|
||||
|
|
|
@ -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"))
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user