Skip to content

Commit

Permalink
Resolve Codacy issues after black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriPavela committed Nov 5, 2023
1 parent 2953db9 commit d1bb9a6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions perun/utils/cli_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,10 @@ def split_requirement(requirement: str) -> str:

ctx = {
"\n".join(
[" " * 4 + l for l in json.dumps(p.serialize(), indent=2, sort_keys=True).split("\n")]
[
" " * 4 + line
for line in json.dumps(p.serialize(), indent=2, sort_keys=True).split("\n")
]
)
for p in config.runtime().safe_get("context.profiles", [])
if "origin" in p.keys()
Expand All @@ -761,8 +764,12 @@ def split_requirement(requirement: str) -> str:
},
},
"command": " ".join(["perun"] + sys.argv[1:]),
"output": helpers.escape_ansi("".join([" " * 4 + l for l in stdout.log.readlines()])),
"error": helpers.escape_ansi("".join([" " * 4 + l for l in stderr.log.readlines()])),
"output": helpers.escape_ansi(
"".join([" " * 4 + line for line in stdout.log.readlines()])
),
"error": helpers.escape_ansi(
"".join([" " * 4 + line for line in stderr.log.readlines()])
),
"exception": reported_error,
"trace": "\n".join(
[
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ def test_reset_outside_pcs(monkeypatch):
asserts.predicate_from_cli(result, result.exit_code == 1)
asserts.predicate_from_cli(result, "could not reset" in result.output)

monkeypatch.setattr("perun.logic.config.lookup_shared_config_dir", lambda: os.getcwd())
monkeypatch.setattr("perun.logic.config.lookup_shared_config_dir", os.getcwd)
result = runner.invoke(config_cli.config, ["--shared", "reset"])
asserts.predicate_from_cli(result, result.exit_code == 0)

Expand Down

0 comments on commit d1bb9a6

Please sign in to comment.