MCPcopy
hub / github.com/PyGithub/PyGithub / _useAttributes

Method _useAttributes

github/PullRequestReview.py:169–193  ·  view source on GitHub ↗
(self, attributes: dict[str, Any])

Source from the content-addressed store, hash-verified

167 self._useAttributes(data)
168
169 def _useAttributes(self, attributes: dict[str, Any]) -> None:
170 if "author_association" in attributes: # pragma no branch
171 self._author_association = self._makeStringAttribute(attributes["author_association"])
172 if "body" in attributes: # pragma no branch
173 self._body = self._makeStringAttribute(attributes["body"])
174 if "body_html" in attributes: # pragma no branch
175 self._body_html = self._makeStringAttribute(attributes["body_html"])
176 if "body_text" in attributes: # pragma no branch
177 self._body_text = self._makeStringAttribute(attributes["body_text"])
178 if "commit_id" in attributes: # pragma no branch
179 self._commit_id = self._makeStringAttribute(attributes["commit_id"])
180 if "html_url" in attributes: # pragma no branch
181 self._html_url = self._makeStringAttribute(attributes["html_url"])
182 if "id" in attributes: # pragma no branch
183 self._id = self._makeIntAttribute(attributes["id"])
184 if "node_id" in attributes: # pragma no branch
185 self._node_id = self._makeStringAttribute(attributes["node_id"])
186 if "pull_request_url" in attributes: # pragma no branch
187 self._pull_request_url = self._makeStringAttribute(attributes["pull_request_url"])
188 if "state" in attributes: # pragma no branch
189 self._state = self._makeStringAttribute(attributes["state"])
190 if "submitted_at" in attributes: # pragma no branch
191 self._submitted_at = self._makeDatetimeAttribute(attributes["submitted_at"])
192 if "user" in attributes: # pragma no branch
193 self._user = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["user"])

Callers 2

dismissMethod · 0.95
editMethod · 0.95

Calls 4

_makeStringAttributeMethod · 0.80
_makeIntAttributeMethod · 0.80
_makeClassAttributeMethod · 0.80

Tested by

no test coverage detected