use list comp for getreports in terminal py (#9243)
This commit is contained in:
parent
49f934618c
commit
7037a58711
|
@ -892,11 +892,7 @@ class TerminalReporter:
|
|||
# Summaries for sessionfinish.
|
||||
#
|
||||
def getreports(self, name: str):
|
||||
values = []
|
||||
for x in self.stats.get(name, []):
|
||||
if not hasattr(x, "_pdbshown"):
|
||||
values.append(x)
|
||||
return values
|
||||
return [x for x in self.stats.get(name, ()) if not hasattr(x, "_pdbshown")]
|
||||
|
||||
def summary_warnings(self) -> None:
|
||||
if self.hasopt("w"):
|
||||
|
|
Loading…
Reference in New Issue