Skip to content

Commit 36dfbd5

Browse files
committed
adding details on err/warning
1 parent dc19185 commit 36dfbd5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

nodescraper/models/taskresult.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,28 +103,28 @@ def duration(self) -> Optional[str]:
103103
return duration
104104

105105
def _get_event_summary(self) -> str:
106-
"""Get summary string for artifacts
106+
"""Get summary string for events
107107
108108
Returns:
109-
str: artifact summary
109+
str: event summary with counts and descriptions
110110
"""
111-
error_count = 0
112-
warning_count = 0
111+
error_msgs = []
112+
warning_msgs = []
113113

114114
for event in self.events:
115115
if event.priority == EventPriority.WARNING:
116-
warning_count += 1
116+
warning_msgs.append(event.description)
117117
elif event.priority >= EventPriority.ERROR:
118-
error_count += 1
118+
error_msgs.append(event.description)
119119

120-
summary_list = []
120+
summary_parts = []
121121

122-
if warning_count:
123-
summary_list.append(f"{warning_count} warnings")
124-
if error_count:
125-
summary_list.append(f"{error_count} errors")
122+
if warning_msgs:
123+
summary_parts.append(f"{len(warning_msgs)} warnings: {', '.join(warning_msgs)}")
124+
if error_msgs:
125+
summary_parts.append(f"{len(error_msgs)} errors: {', '.join(error_msgs)}")
126126

127-
return "|".join(summary_list)
127+
return "; ".join(summary_parts)
128128

129129
def _update_status(self) -> None:
130130
"""Update overall status based on event priority"""

0 commit comments

Comments
 (0)