Skip to content

Commit fd0b3e2

Browse files
committed
getreportopt: remove needless if
1 parent 19035f4 commit fd0b3e2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/_pytest/terminal.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,14 @@ def getreportopt(config):
165165
reportchars += "w"
166166
elif config.option.disable_warnings and "w" in reportchars:
167167
reportchars = reportchars.replace("w", "")
168-
if reportchars:
169-
for char in reportchars:
170-
if char == "a":
171-
reportopts = "sxXwEf"
172-
elif char == "A":
173-
reportopts = "sxXwEfpP"
174-
break
175-
elif char not in reportopts:
176-
reportopts += char
168+
for char in reportchars:
169+
if char == "a":
170+
reportopts = "sxXwEf"
171+
elif char == "A":
172+
reportopts = "sxXwEfpP"
173+
break
174+
elif char not in reportopts:
175+
reportopts += char
177176
return reportopts
178177

179178

0 commit comments

Comments
 (0)