(self, attributes: dict[str, Any])
| 363 | ) |
| 364 | |
| 365 | def _useAttributes(self, attributes: dict[str, Any]) -> None: |
| 366 | super()._useAttributes(attributes) |
| 367 | if "author" in attributes: # pragma no branch |
| 368 | self._author = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["author"]) |
| 369 | if "comments_url" in attributes: # pragma no branch |
| 370 | self._comments_url = self._makeStringAttribute(attributes["comments_url"]) |
| 371 | if "commit" in attributes: # pragma no branch |
| 372 | self._commit = self._makeClassAttribute(github.GitCommit.GitCommit, attributes["commit"]) |
| 373 | if "committer" in attributes: # pragma no branch |
| 374 | self._committer = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["committer"]) |
| 375 | if "files" in attributes: # pragma no branch |
| 376 | self._files = self._makeListOfClassesAttribute(github.File.File, attributes["files"]) |
| 377 | if "html_url" in attributes: # pragma no branch |
| 378 | self._html_url = self._makeStringAttribute(attributes["html_url"]) |
| 379 | if "node_id" in attributes: # pragma no branch |
| 380 | self._node_id = self._makeStringAttribute(attributes["node_id"]) |
| 381 | if "parents" in attributes: # pragma no branch |
| 382 | self._parents = self._makeListOfClassesAttribute(Commit, attributes["parents"]) |
| 383 | if "repository" in attributes: # pragma no branch |
| 384 | self._repository = self._makeClassAttribute(github.Repository.Repository, attributes["repository"]) |
| 385 | if "sha" in attributes: # pragma no branch |
| 386 | self._sha = self._makeStringAttribute(attributes["sha"]) |
| 387 | elif "url" in attributes and attributes["url"]: |
| 388 | quoted_sha = attributes["url"].split("/")[-1] |
| 389 | sha = urllib.parse.unquote(quoted_sha) |
| 390 | self._sha = self._makeStringAttribute(sha) |
| 391 | if "stats" in attributes: # pragma no branch |
| 392 | self._stats = self._makeClassAttribute(github.CommitStats.CommitStats, attributes["stats"]) |
| 393 | if "text_matches" in attributes: # pragma no branch |
| 394 | self._text_matches = self._makeDictAttribute(attributes["text_matches"]) |
| 395 | |
| 396 | |
| 397 | class CommitSearchResult(Commit): |
no test coverage detected