(self, attributes: dict[str, Any])
| 180 | ) |
| 181 | |
| 182 | def _useAttributes(self, attributes: dict[str, Any]) -> None: |
| 183 | # super class is a REST API GithubObject, attributes are coming from GraphQL |
| 184 | super()._useAttributes(as_rest_api_attributes(attributes)) |
| 185 | if "answer" in attributes: # pragma no branch |
| 186 | self._answer = self._makeClassAttribute( |
| 187 | github.RepositoryDiscussionComment.RepositoryDiscussionComment, attributes["answer"] |
| 188 | ) |
| 189 | if "bodyText" in attributes: # pragma no branch |
| 190 | self._body_text = self._makeStringAttribute(attributes["bodyText"]) |
| 191 | if "category" in attributes: # pragma no branch |
| 192 | self._category = self._makeClassAttribute( |
| 193 | github.RepositoryDiscussionCategory.RepositoryDiscussionCategory, attributes["category"] |
| 194 | ) |
| 195 | if "comments" in attributes: # pragma no branch |
| 196 | # comments are GraphQL API objects |
| 197 | self._comments_page = attributes["comments"]["nodes"] |
| 198 | if "databaseId" in attributes: # pragma no branch |
| 199 | self._database_id = self._makeIntAttribute(attributes["databaseId"]) |
| 200 | if "editor" in attributes: # pragma no branch |
| 201 | self._editor = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["editor"]) |
| 202 | if "id" in attributes: # pragma no branch |
| 203 | self._id = self._makeStringAttribute(attributes["id"]) |
| 204 | if "labels" in attributes: # pragma no branch |
| 205 | # labels are REST API objects |
| 206 | self._labels_page = as_rest_api_attributes_list(attributes["labels"]["nodes"]) # type: ignore |
| 207 | if "reactions" in attributes: # pragma no branch |
| 208 | # reactions are REST API objects |
| 209 | self._reactions_page = as_rest_api_attributes_list(attributes["reactions"]["nodes"]) # type: ignore |
| 210 | if "repository" in attributes: # pragma no branch |
| 211 | self._repository = self._makeClassAttribute( |
| 212 | github.Repository.Repository, as_rest_api_attributes(attributes["repository"]) |
| 213 | ) |
nothing calls this directly
no test coverage detected