Apply YAPF

This commit is contained in:
Ivan Kravets
2017-06-05 16:05:05 +03:00
parent 45e75f7473
commit 4d1a135d76
21 changed files with 183 additions and 150 deletions

View File

@@ -169,11 +169,12 @@ class EnvironmentProcessor(object):
if not self.silent:
click.echo("[%s] Processing %s (%s)" %
(datetime.now().strftime("%c"), click.style(
self.name, fg="cyan", bold=True), "; ".join([
"%s: %s" % (k, v.replace("\n", ", "))
for k, v in self.options.items()
])))
(datetime.now().strftime("%c"),
click.style(self.name, fg="cyan", bold=True),
"; ".join([
"%s: %s" % (k, v.replace("\n", ", "))
for k, v in self.options.items()
])))
click.secho("-" * terminal_width, bold=True)
self.options = self._validate_options(self.options)
@@ -185,10 +186,10 @@ class EnvironmentProcessor(object):
if is_error or "piotest_processor" not in self.cmd_ctx.meta:
print_header(
"[%s] Took %.2f seconds" % ((click.style(
"ERROR", fg="red", bold=True) if is_error else click.style(
"SUCCESS", fg="green", bold=True)),
time() - start_time),
"[%s] Took %.2f seconds" %
((click.style("ERROR", fg="red", bold=True)
if is_error else click.style(
"SUCCESS", fg="green", bold=True)), time() - start_time),
is_error=is_error)
return not is_error
@@ -356,9 +357,10 @@ def print_summary(results, start_time):
err=status is False)
print_header(
"[%s] Took %.2f seconds" % ((click.style(
"SUCCESS", fg="green", bold=True) if successed else click.style(
"ERROR", fg="red", bold=True)), time() - start_time),
"[%s] Took %.2f seconds" %
((click.style("SUCCESS", fg="green", bold=True)
if successed else click.style("ERROR", fg="red", bold=True)),
time() - start_time),
is_error=not successed)