Fix all errors introduced by new flake8 release

Change-Id: Ie9c99433938542a6892dcf164d9f9f3625b44bd0
This commit is contained in:
Andrey Kurilin 2020-05-12 12:56:11 +03:00
parent be72fbb292
commit ab365e9bbb
4 changed files with 4 additions and 4 deletions

View File

@ -173,7 +173,7 @@ class _Deployment(APIGroup):
# includes Exception cls with a message. By parsing it,
# we can get etype.
trace = res["traceback"].split("\n")
last_line = [l for l in trace if l][-1]
last_line = [line for line in trace if line][-1]
etype, _msg = last_line.split(":", 1)
else:
etype = "n/a"

View File

@ -57,7 +57,7 @@ def trim(docstring):
def reindent(string):
return "\n".join(l.strip() for l in string.strip().split("\n"))
return "\n".join(line.strip() for line in string.strip().split("\n"))
def parse_docstring(docstring):

View File

@ -124,7 +124,7 @@ def main():
results_dir = args.results_dir
rally(f"task report --html-static --out {results_dir}/self_report.html")
rally(f"task report --json --out {results_dir}/self_report.json")
rally(f"task sla-check")
rally("task sla-check")
if __name__ == "__main__":

View File

@ -383,7 +383,7 @@ class ElasticSearchExporterTestCase(test.TestCase):
# the should be always empty line in the end
self.assertEqual("", data[-1])
data = [json.loads(l) for l in exporter._report]
data = [json.loads(line) for line in exporter._report]
self.assertIsInstance(data, list)
expected = [
{