chore: setuponly - migrate to f string

This commit is contained in:
Ronny Pfannschmidt 2024-02-21 16:15:27 +01:00
parent bbe6b4a218
commit 20c558c84a
1 changed files with 3 additions and 7 deletions

View File

@ -73,13 +73,9 @@ def _show_fixture_action(
# Use smaller indentation the higher the scope: Session = 0, Package = 1, etc.
scope_indent = list(reversed(Scope)).index(fixturedef._scope)
tw.write(" " * 2 * scope_indent)
tw.write(
"{step} {scope} {fixture}".format( # noqa: UP032 (Readability)
step=msg.ljust(8), # align the output to TEARDOWN
scope=fixturedef.scope[0].upper(),
fixture=fixturedef.argname,
)
)
scopename = fixturedef.scope[0].upper()
tw.write(f"{msg:<8} {scopename} {fixturedef.argname}")
if msg == "SETUP":
deps = sorted(arg for arg in fixturedef.argnames if arg != "request")