Skip to content

Commit

Permalink
tests: Format log printing according to E231 flake8 rule.
Browse files Browse the repository at this point in the history
Without this when using Python 3.12 and flake8 5.0.4 the following
errors are flagged:
  tests/check_acl_log.py:97:25: E231 missing whitespace after ':'
  tests/check_acl_log.py:102:71: E231 missing whitespace after ':'

While this seems a bit too restrictive from flake8 we can easily work
around it by just not using f-strings unless necessary.

This unblocks GitHub CI runs.  These started failing since the Python
version we get in CI (Fedora container and Ubuntu host) changed to 3.12.

Signed-off-by: Dumitru Ceara <[email protected]>
  • Loading branch information
dceara committed Nov 11, 2023
1 parent 3bf6740 commit 8040ae7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/check_acl_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ def main():
print(
f"Expected log {key}={val} but got "
f"{key}={parsed_log[key]} "
f"in:\n\t'{acl_log}'"
"in:\n\t"
f"'{acl_log}'"
)
exit(1)
except KeyError:
print(
f"Expected log {key}={val} but {key} does not exist in:\n"
f"Expected log {key}={val} but {key} "
"does not exist in:\n"
f"\t'{acl_log}'"
)
exit(1)
Expand Down

0 comments on commit 8040ae7

Please sign in to comment.