(self, attributes: dict[str, Any])
| 261 | ) |
| 262 | |
| 263 | def _useAttributes(self, attributes: dict[str, Any]) -> None: |
| 264 | if "created_at" in attributes: # pragma no branch |
| 265 | self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) |
| 266 | if "creator" in attributes: # pragma no branch |
| 267 | self._creator = self._makeUnionClassAttributeFromTypeKey( |
| 268 | "type", |
| 269 | "User", |
| 270 | attributes["creator"], |
| 271 | (github.NamedUser.NamedUser, "User"), |
| 272 | (github.Organization.Organization, "Organization"), |
| 273 | ) |
| 274 | if "description" in attributes: # pragma no branch |
| 275 | self._description = self._makeStringAttribute(attributes["description"]) |
| 276 | if "environment" in attributes: # pragma no branch |
| 277 | self._environment = self._makeStringAttribute(attributes["environment"]) |
| 278 | if "id" in attributes: # pragma no branch |
| 279 | self._id = self._makeIntAttribute(attributes["id"]) |
| 280 | elif "url" in attributes and attributes["url"]: |
| 281 | id = attributes["url"].split("/")[-1] |
| 282 | if id.isnumeric(): |
| 283 | self._id = self._makeIntAttribute(int(id)) |
| 284 | if "node_id" in attributes: # pragma no branch |
| 285 | self._node_id = self._makeStringAttribute(attributes["node_id"]) |
| 286 | if "original_environment" in attributes: # pragma no branch |
| 287 | self._original_environment = self._makeStringAttribute(attributes["original_environment"]) |
| 288 | if "payload" in attributes: # pragma no branch |
| 289 | self._payload = self._makeDictAttribute(attributes["payload"]) |
| 290 | if "performed_via_github_app" in attributes: # pragma no branch |
| 291 | self._performed_via_github_app = self._makeClassAttribute( |
| 292 | github.GithubApp.GithubApp, attributes["performed_via_github_app"] |
| 293 | ) |
| 294 | if "production_environment" in attributes: # pragma no branch |
| 295 | self._production_environment = self._makeBoolAttribute(attributes["production_environment"]) |
| 296 | if "ref" in attributes: # pragma no branch |
| 297 | self._ref = self._makeStringAttribute(attributes["ref"]) |
| 298 | if "repository_url" in attributes: # pragma no branch |
| 299 | self._repository_url = self._makeStringAttribute(attributes["repository_url"]) |
| 300 | if "sha" in attributes: # pragma no branch |
| 301 | self._sha = self._makeStringAttribute(attributes["sha"]) |
| 302 | if "statuses_url" in attributes: # pragma no branch |
| 303 | self._statuses_url = self._makeStringAttribute(attributes["statuses_url"]) |
| 304 | if "task" in attributes: # pragma no branch |
| 305 | self._task = self._makeStringAttribute(attributes["task"]) |
| 306 | if "transient_environment" in attributes: # pragma no branch |
| 307 | self._transient_environment = self._makeBoolAttribute(attributes["transient_environment"]) |
| 308 | if "updated_at" in attributes: # pragma no branch |
| 309 | self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"]) |
| 310 | if "url" in attributes: # pragma no branch |
| 311 | self._url = self._makeStringAttribute(attributes["url"]) |
nothing calls this directly
no test coverage detected