############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques # # Copyright 2012 Zearin # # Copyright 2013 AKFish # # Copyright 2013 Vincent Jacques # # Copyright 2014 Vincent Jacques # # Copyright 2016 Peter Buckley # # Copyright 2018 Wan Liuyang # # Copyright 2018 sfdye # # # # This file is part of PyGithub. # # http://pygithub.readthedocs.io/ # # # # PyGithub is free software: you can redistribute it and/or modify it under # # the terms of the GNU Lesser General Public License as published by the Free # # Software Foundation, either version 3 of the License, or (at your option) # # any later version. # # # # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # # details. # # # # You should have received a copy of the GNU Lesser General Public License # # along with PyGithub. If not, see . # # # ################################################################################ from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet class IssuePullRequest(NonCompletableGithubObject): """ This class represents IssuePullRequests """ def _initAttributes(self) -> None: self._diff_url: Attribute[str] = NotSet self._html_url: Attribute[str] = NotSet self._patch_url: Attribute[str] = NotSet @property def diff_url(self) -> str: return self._diff_url.value @property def html_url(self) -> str: return self._html_url.value @property def patch_url(self) -> str: return self._patch_url.value def _useAttributes(self, attributes) -> None: if "diff_url" in attributes: # pragma no branch self._diff_url = self._makeStringAttribute(attributes["diff_url"]) if "html_url" in attributes: # pragma no branch self._html_url = self._makeStringAttribute(attributes["html_url"]) if "patch_url" in attributes: # pragma no branch self._patch_url = self._makeStringAttribute(attributes["patch_url"])