diff --git a/github/PullRequestMergeStatus.py b/github/PullRequestMergeStatus.py index 578ff1e4..01a5d79f 100644 --- a/github/PullRequestMergeStatus.py +++ b/github/PullRequestMergeStatus.py @@ -28,46 +28,36 @@ # along with PyGithub. If not, see . # # # ################################################################################ - from typing import Any, Dict -import github.GithubObject +from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet -class PullRequestMergeStatus(github.GithubObject.NonCompletableGithubObject): +class PullRequestMergeStatus(NonCompletableGithubObject): """ This class represents PullRequestMergeStatuses. The reference can be found here https://docs.github.com/en/rest/reference/pulls#check-if-a-pull-request-has-been-merged """ + def _initAttributes(self) -> None: + self._merged: Attribute[bool] = NotSet + self._message: Attribute[str] = NotSet + self._sha: Attribute[str] = NotSet + def __repr__(self) -> str: return self.get__repr__({"sha": self._sha.value, "merged": self._merged.value}) @property - def merged(self): - """ - :type: bool - """ + def merged(self) -> bool: return self._merged.value @property - def message(self): - """ - :type: string - """ + def message(self) -> str: return self._message.value @property - def sha(self): - """ - :type: string - """ + def sha(self) -> str: return self._sha.value - def _initAttributes(self) -> None: - self._merged = github.GithubObject.NotSet - self._message = github.GithubObject.NotSet - self._sha = github.GithubObject.NotSet - def _useAttributes(self, attributes: Dict[str, Any]) -> None: if "merged" in attributes: # pragma no branch self._merged = self._makeBoolAttribute(attributes["merged"]) diff --git a/github/PullRequestMergeStatus.pyi b/github/PullRequestMergeStatus.pyi deleted file mode 100644 index c7fb42f3..00000000 --- a/github/PullRequestMergeStatus.pyi +++ /dev/null @@ -1,14 +0,0 @@ -from typing import Any, Dict - -from github.GithubObject import NonCompletableGithubObject - -class PullRequestMergeStatus(NonCompletableGithubObject): - def __repr__(self) -> str: ... - def _initAttributes(self) -> None: ... - def _useAttributes(self, attributes: Dict[str, Any]) -> None: ... - @property - def merged(self) -> bool: ... - @property - def message(self) -> str: ... - @property - def sha(self) -> str: ...