152 testResult = self.__testResults[row] |
152 testResult = self.__testResults[row] |
153 with contextlib.suppress(KeyError): |
153 with contextlib.suppress(KeyError): |
154 return self.__backgroundColors[testResult.category] |
154 return self.__backgroundColors[testResult.category] |
155 elif role == Qt.ItemDataRole.TextAlignmentRole: |
155 elif role == Qt.ItemDataRole.TextAlignmentRole: |
156 if idx == TopLevelId and column == TestResultsModel.DurationColumn: |
156 if idx == TopLevelId and column == TestResultsModel.DurationColumn: |
157 return Qt.AlignmentFlag.AlignRight |
157 return Qt.AlignmentFlag.AlignRight.value |
158 elif role == Qt.ItemDataRole.UserRole: # __IGNORE_WARNING_Y102__ |
158 elif role == Qt.ItemDataRole.UserRole: # __IGNORE_WARNING_Y102__ |
159 if idx == TopLevelId: |
159 if idx == TopLevelId: |
160 testresult = self.__testResults[row] |
160 testresult = self.__testResults[row] |
161 return (testresult.filename, testresult.lineno) |
161 return (testresult.filename, testresult.lineno) |
162 |
162 |