mirror of
https://github.com/django/daphne.git
synced 2025-07-12 17:02:18 +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
|
Returns the channel names this route listens on
|
||||||
"""
|
"""
|
||||||
return {self.channel,}
|
return {self.channel, }
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "%s %s -> %s" % (
|
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",
|
"content": b"re=fou",
|
||||||
"more_content": True,
|
"more_content": True,
|
||||||
})
|
})
|
||||||
|
|
||||||
class VeryImpatientRequest(AsgiRequest):
|
class VeryImpatientRequest(AsgiRequest):
|
||||||
body_receive_timeout = 0
|
body_receive_timeout = 0
|
||||||
|
|
||||||
with self.assertRaises(RequestTimeout):
|
with self.assertRaises(RequestTimeout):
|
||||||
VeryImpatientRequest(self.get_next_message("test"))
|
VeryImpatientRequest(self.get_next_message("test"))
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import os.path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
### Transforms: Turn one content string into another ###
|
# Transforms: Turn one content string into another
|
||||||
|
|
||||||
class Replacement(object):
|
class Replacement(object):
|
||||||
"""
|
"""
|
||||||
|
@ -45,10 +45,10 @@ class Insert(object):
|
||||||
if self.after:
|
if self.after:
|
||||||
return value[:match.end()] + self.to_insert + value[match.end():]
|
return value[:match.end()] + self.to_insert + value[match.end():]
|
||||||
else:
|
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):
|
class FileMap(object):
|
||||||
"""
|
"""
|
||||||
|
@ -98,7 +98,7 @@ class NewFile(object):
|
||||||
fh.write(self.content)
|
fh.write(self.content)
|
||||||
|
|
||||||
|
|
||||||
### Main class ###
|
# Main class and config
|
||||||
|
|
||||||
|
|
||||||
global_transforms = [
|
global_transforms = [
|
||||||
|
@ -154,7 +154,9 @@ class Patchinator(object):
|
||||||
"channels/worker.py", "django/channels/worker.py", global_transforms,
|
"channels/worker.py", "django/channels/worker.py", global_transforms,
|
||||||
),
|
),
|
||||||
FileMap(
|
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
|
# Tests
|
||||||
FileMap(
|
FileMap(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user