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.
|
# Summaries for sessionfinish.
|
||||||
#
|
#
|
||||||
def getreports(self, name: str):
|
def getreports(self, name: str):
|
||||||
values = []
|
return [x for x in self.stats.get(name, ()) if not hasattr(x, "_pdbshown")]
|
||||||
for x in self.stats.get(name, []):
|
|
||||||
if not hasattr(x, "_pdbshown"):
|
|
||||||
values.append(x)
|
|
||||||
return values
|
|
||||||
|
|
||||||
def summary_warnings(self) -> None:
|
def summary_warnings(self) -> None:
|
||||||
if self.hasopt("w"):
|
if self.hasopt("w"):
|
||||||
|
|
Loading…
Reference in New Issue