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

Method _useAttributes

github/Comparison.py:190–215  ·  view source on GitHub ↗
(self, attributes: dict[str, Any])

Source from the content-addressed store, hash-verified

188 )
189
190 def _useAttributes(self, attributes: dict[str, Any]) -> None:
191 super()._useAttributes(attributes)
192 if "ahead_by" in attributes: # pragma no branch
193 self._ahead_by = self._makeIntAttribute(attributes["ahead_by"])
194 if "base_commit" in attributes: # pragma no branch
195 self._base_commit = self._makeClassAttribute(github.Commit.Commit, attributes["base_commit"])
196 if "behind_by" in attributes: # pragma no branch
197 self._behind_by = self._makeIntAttribute(attributes["behind_by"])
198 if "commits" in attributes: # pragma no branch
199 self._commits = self._makeListOfClassesAttribute(github.Commit.Commit, attributes["commits"])
200 if "diff_url" in attributes: # pragma no branch
201 self._diff_url = self._makeStringAttribute(attributes["diff_url"])
202 if "files" in attributes: # pragma no branch
203 self._files = self._makeListOfClassesAttribute(github.File.File, attributes["files"])
204 if "html_url" in attributes: # pragma no branch
205 self._html_url = self._makeStringAttribute(attributes["html_url"])
206 if "merge_base_commit" in attributes: # pragma no branch
207 self._merge_base_commit = self._makeClassAttribute(github.Commit.Commit, attributes["merge_base_commit"])
208 if "patch_url" in attributes: # pragma no branch
209 self._patch_url = self._makeStringAttribute(attributes["patch_url"])
210 if "permalink_url" in attributes: # pragma no branch
211 self._permalink_url = self._makeStringAttribute(attributes["permalink_url"])
212 if "status" in attributes: # pragma no branch
213 self._status = self._makeStringAttribute(attributes["status"])
214 if "total_commits" in attributes: # pragma no branch
215 self._total_commits = self._makeIntAttribute(attributes["total_commits"])

Callers

nothing calls this directly

Calls 4

_makeIntAttributeMethod · 0.80
_makeClassAttributeMethod · 0.80
_makeStringAttributeMethod · 0.80

Tested by

no test coverage detected