Skip to content

Commit 20c558c

Browse files
chore: setuponly - migrate to f string
1 parent bbe6b4a commit 20c558c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/_pytest/setuponly.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,9 @@ def _show_fixture_action(
7373
# Use smaller indentation the higher the scope: Session = 0, Package = 1, etc.
7474
scope_indent = list(reversed(Scope)).index(fixturedef._scope)
7575
tw.write(" " * 2 * scope_indent)
76-
tw.write(
77-
"{step} {scope} {fixture}".format( # noqa: UP032 (Readability)
78-
step=msg.ljust(8), # align the output to TEARDOWN
79-
scope=fixturedef.scope[0].upper(),
80-
fixture=fixturedef.argname,
81-
)
82-
)
76+
77+
scopename = fixturedef.scope[0].upper()
78+
tw.write(f"{msg:<8} {scopename} {fixturedef.argname}")
8379

8480
if msg == "SETUP":
8581
deps = sorted(arg for arg in fixturedef.argnames if arg != "request")

0 commit comments

Comments
 (0)