pep8: Fix E301 pep8 violations.

Fix "E301: expected (1 or 2) blank line" pep8 violations.
This commit is contained in:
Rafid Aslam 2016-11-29 13:22:02 +07:00 committed by Tim Abbott
parent d4410365ea
commit 1ae8ac85d8
4 changed files with 6 additions and 0 deletions

View file

@ -35,6 +35,7 @@ class IRCBot(irc.bot.SingleServerIRCBot):
def on_welcome(self, c, e): def on_welcome(self, c, e):
# type: (ServerConnection, Event) -> None # type: (ServerConnection, Event) -> None
c.join(self.channel) c.join(self.channel)
def forward_to_irc(msg): def forward_to_irc(msg):
# type: (Dict[str, Any]) -> None # type: (Dict[str, Any]) -> None
if msg["type"] == "stream": if msg["type"] == "stream":

View file

@ -62,6 +62,7 @@ if options.forward_class_messages and not options.noshard:
from zerver.lib.parallel import run_parallel from zerver.lib.parallel import run_parallel
print("Starting parallel zephyr class mirroring bot") print("Starting parallel zephyr class mirroring bot")
jobs = list("0123456789abcdef") jobs = list("0123456789abcdef")
def run_job(shard): def run_job(shard):
# type: (str) -> int # type: (str) -> int
subprocess.call(args + ["--shard=%s" % (shard,)]) subprocess.call(args + ["--shard=%s" % (shard,)])

View file

@ -39,9 +39,11 @@ except ImportError:
"""This exception is raised when a process run by check_call() returns """This exception is raised when a process run by check_call() returns
a non-zero exit status. The exit status will be stored in the a non-zero exit status. The exit status will be stored in the
returncode attribute.""" returncode attribute."""
def __init__(self, returncode, cmd): def __init__(self, returncode, cmd):
self.returncode = returncode self.returncode = returncode
self.cmd = cmd self.cmd = cmd
def __str__(self): def __str__(self):
return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode)

View file

@ -398,6 +398,7 @@ class Client(object):
if request is None: if request is None:
request = {} request = {}
return request return request
def call(self, *args, **kwargs): def call(self, *args, **kwargs):
request = make_request(*args, **kwargs) request = make_request(*args, **kwargs)
if computed_url is not None: if computed_url is not None:
@ -411,6 +412,7 @@ class Client(object):
def call_on_each_event(self, callback, event_types=None, narrow=None): def call_on_each_event(self, callback, event_types=None, narrow=None):
if narrow is None: if narrow is None:
narrow = [] narrow = []
def do_register(): def do_register():
while True: while True:
if event_types is None: if event_types is None: