MCPcopy Create free account
hub / github.com/argotorg/solidity / __init__

Method __init__

scripts/externalTests/benchmark_diff.py:193–212  ·  view source on GitHub ↗
(self, diff: dict)

Source from the content-addressed store, hash-verified

191 cells: Mapping[str, Mapping[str, Mapping[str, Union[int, float, str]]]] # preset -> project -> attribute
192
193 def __init__(self, diff: dict):
194 self.table_headers = sorted(self._find_all_preset_names(diff))
195 self.column_headers = sorted(self._find_all_attribute_names(diff))
196 self.row_headers = sorted(project for project in diff)
197
198 # All dimensions must have unique values
199 assert len(self.table_headers) == len(set(self.table_headers))
200 assert len(self.column_headers) == len(set(self.column_headers))
201 assert len(self.row_headers) == len(set(self.row_headers))
202
203 self.cells = {
204 preset: {
205 project: {
206 attribute: self._cell_content(diff, project, preset, attribute)
207 for attribute in self.column_headers
208 }
209 for project in self.row_headers
210 }
211 for preset in self.table_headers
212 }
213
214 def calculate_row_column_width(self) -> int:
215 return max(len(h) for h in self.row_headers)

Callers

nothing calls this directly

Calls 3

_cell_contentMethod · 0.95

Tested by

no test coverage detected