blob: b61b571c3865fff0ab910be2ca8e1b6f65f488dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
from typing import Dict
class ReportsCollection:
"""Collection to store steps execution statuses."""
def __init__(self) -> None:
"""Initialize collection."""
self._collection: list = []
def put(self, item: Dict[str, str]) -> None:
"""Put execution status dictionary.
Args:
item (Dict[str, str]): Step name with status dictionary
"""
self._collection.append(item)
@property
def report(self) -> Dict[str, str]:
"""Get report.
Build a dictionary with execution statuses.
Returns:
Dict[str, str]: Steps name with status dictionary
"""
report: Dict[str, str] = {}
for element in self._collection[::-1]:
print(element)
print(type(element))
report.update(element)
return report
|