Skip to content
Snippets Groups Projects
Commit 89b2a525 authored by Florian Bruhin's avatar Florian Bruhin
Browse files

Fix flake8

parent 579688ca
Branches
No related tags found
No related merge requests found
[flake8]
max-line-length = 88
extend-ignore = E203
......@@ -29,7 +29,8 @@ def upload_file(
force: bool = False,
) -> None:
if project:
# dirty hack because url is fixed for testbook at the moment. After the module it needs to be changed to a base url
# dirty hack because url is fixed for testbook at the moment.
# After the module it needs to be changed to a base url
url = f"{url[:-8]}project"
if (
......@@ -67,16 +68,15 @@ def upload_file(
("xpassed", ""),
]:
if test_result[status]:
console.print(
Panel(
"\n".join(
[
lines = [
f" - test_{test['nodeid']:02d} {test['outcome']} at {test['when']}"
if test["when"] != "call"
else f" - test_{test['nodeid']:02d} {test['outcome']}"
for test in test_result[status]
]
),
console.print(
Panel(
"\n".join(lines),
title=status.capitalize(),
subtitle=f"{len(test_result[status])}",
style=style,
......@@ -90,14 +90,15 @@ def upload_file(
print(f"[red]Message: {data.get('msg')}[/]", file=sys.stderr)
timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
print(f":boom: [bold]Submission failed![/] [white]({timestamp})[/]")
except:
except Exception: # FIXME
pass
raise typer.Exit(code=1)
commit = result.get("commit", "?")
timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
print(
f":mailbox: :heavy_check_mark: [bold]Submission successful![/] [white]({timestamp}, {commit})[/]"
":mailbox: :heavy_check_mark: [bold]Submission successful![/] "
f"[white]({timestamp}, {commit})[/]"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment