(self, attributes: dict[str, Any])
| 166 | ) |
| 167 | |
| 168 | def _useAttributes(self, attributes: dict[str, Any]) -> None: |
| 169 | if "assignees" in attributes: # pragma no branch |
| 170 | self._assignees = self._makeListOfClassesAttribute(github.NamedUser.NamedUser, attributes["assignees"]) |
| 171 | if "created_at" in attributes: # pragma no branch |
| 172 | self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) |
| 173 | if "dismissal_approved_by" in attributes: # pragma no branch |
| 174 | self._dismissal_approved_by = self._makeUnionClassAttributeFromTypeKey( |
| 175 | "type", |
| 176 | "User", |
| 177 | attributes["dismissal_approved_by"], |
| 178 | (github.NamedUser.NamedUser, "User"), |
| 179 | (github.Organization.Organization, "Organization"), |
| 180 | ) |
| 181 | if "dismissed_at" in attributes: # pragma no branch |
| 182 | self._dismissed_at = self._makeDatetimeAttribute(attributes["dismissed_at"]) |
| 183 | if "dismissed_by" in attributes: # pragma no branch |
| 184 | self._dismissed_by = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["dismissed_by"]) |
| 185 | if "dismissed_comment" in attributes: # pragma no branch |
| 186 | self._dismissed_comment = self._makeStringAttribute(attributes["dismissed_comment"]) |
| 187 | if "dismissed_reason" in attributes: # pragma no branch |
| 188 | self._dismissed_reason = self._makeStringAttribute(attributes["dismissed_reason"]) |
| 189 | if "fixed_at" in attributes: # pragma no branch |
| 190 | self._fixed_at = self._makeDatetimeAttribute(attributes["fixed_at"]) |
| 191 | if "html_url" in attributes: # pragma no branch |
| 192 | self._html_url = self._makeStringAttribute(attributes["html_url"]) |
| 193 | if "instances_url" in attributes: # pragma no branch |
| 194 | self._instances_url = self._makeStringAttribute(attributes["instances_url"]) |
| 195 | if "most_recent_instance" in attributes: # pragma no branch |
| 196 | self._most_recent_instance = self._makeClassAttribute( |
| 197 | github.CodeScanAlertInstance.CodeScanAlertInstance, |
| 198 | attributes["most_recent_instance"], |
| 199 | ) |
| 200 | if "number" in attributes: # pragma no branch |
| 201 | self._number = self._makeIntAttribute(attributes["number"]) |
| 202 | if "rule" in attributes: # pragma no branch |
| 203 | self._rule = self._makeClassAttribute(github.CodeScanRule.CodeScanRule, attributes["rule"]) |
| 204 | if "state" in attributes: # pragma no branch |
| 205 | self._state = self._makeStringAttribute(attributes["state"]) |
| 206 | if "tool" in attributes: # pragma no branch |
| 207 | self._tool = self._makeClassAttribute(github.CodeScanTool.CodeScanTool, attributes["tool"]) |
| 208 | if "updated_at" in attributes: # pragma no branch |
| 209 | self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"]) |
| 210 | if "url" in attributes: # pragma no branch |
| 211 | self._url = self._makeStringAttribute(attributes["url"]) |
nothing calls this directly
no test coverage detected