Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/github/GistHistoryState.py @ 0:d67268158946 draft
planemo upload commit a3f181f5f126803c654b3a66dd4e83a48f7e203b
| author | bcclaywell |
|---|---|
| date | Mon, 12 Oct 2015 17:43:33 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:d67268158946 |
|---|---|
| 1 # -*- coding: utf-8 -*- | |
| 2 | |
| 3 # ########################## Copyrights and license ############################ | |
| 4 # # | |
| 5 # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # | |
| 6 # Copyright 2012 Zearin <zearin@gonk.net> # | |
| 7 # Copyright 2013 AKFish <akfish@gmail.com> # | |
| 8 # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # | |
| 9 # # | |
| 10 # This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ # | |
| 11 # # | |
| 12 # PyGithub is free software: you can redistribute it and/or modify it under # | |
| 13 # the terms of the GNU Lesser General Public License as published by the Free # | |
| 14 # Software Foundation, either version 3 of the License, or (at your option) # | |
| 15 # any later version. # | |
| 16 # # | |
| 17 # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # | |
| 18 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # | |
| 19 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # | |
| 20 # details. # | |
| 21 # # | |
| 22 # You should have received a copy of the GNU Lesser General Public License # | |
| 23 # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. # | |
| 24 # # | |
| 25 # ############################################################################## | |
| 26 | |
| 27 import github.GithubObject | |
| 28 | |
| 29 import github.NamedUser | |
| 30 import github.CommitStats | |
| 31 import github.Gist | |
| 32 | |
| 33 | |
| 34 class GistHistoryState(github.GithubObject.CompletableGithubObject): | |
| 35 """ | |
| 36 This class represents GistHistoryStates as returned for example by http://developer.github.com/v3/todo | |
| 37 """ | |
| 38 | |
| 39 @property | |
| 40 def change_status(self): | |
| 41 """ | |
| 42 :type: :class:`github.CommitStats.CommitStats` | |
| 43 """ | |
| 44 self._completeIfNotSet(self._change_status) | |
| 45 return self._change_status.value | |
| 46 | |
| 47 @property | |
| 48 def comments(self): | |
| 49 """ | |
| 50 :type: integer | |
| 51 """ | |
| 52 self._completeIfNotSet(self._comments) | |
| 53 return self._comments.value | |
| 54 | |
| 55 @property | |
| 56 def comments_url(self): | |
| 57 """ | |
| 58 :type: string | |
| 59 """ | |
| 60 self._completeIfNotSet(self._comments_url) | |
| 61 return self._comments_url.value | |
| 62 | |
| 63 @property | |
| 64 def commits_url(self): | |
| 65 """ | |
| 66 :type: string | |
| 67 """ | |
| 68 self._completeIfNotSet(self._commits_url) | |
| 69 return self._commits_url.value | |
| 70 | |
| 71 @property | |
| 72 def committed_at(self): | |
| 73 """ | |
| 74 :type: datetime.datetime | |
| 75 """ | |
| 76 self._completeIfNotSet(self._committed_at) | |
| 77 return self._committed_at.value | |
| 78 | |
| 79 @property | |
| 80 def created_at(self): | |
| 81 """ | |
| 82 :type: datetime.datetime | |
| 83 """ | |
| 84 self._completeIfNotSet(self._created_at) | |
| 85 return self._created_at.value | |
| 86 | |
| 87 @property | |
| 88 def description(self): | |
| 89 """ | |
| 90 :type: string | |
| 91 """ | |
| 92 self._completeIfNotSet(self._description) | |
| 93 return self._description.value | |
| 94 | |
| 95 @property | |
| 96 def files(self): | |
| 97 """ | |
| 98 :type: dict of string to :class:`github.GistFile.GistFile` | |
| 99 """ | |
| 100 self._completeIfNotSet(self._files) | |
| 101 return self._files.value | |
| 102 | |
| 103 @property | |
| 104 def forks(self): | |
| 105 """ | |
| 106 :type: list of :class:`github.Gist.Gist` | |
| 107 """ | |
| 108 self._completeIfNotSet(self._forks) | |
| 109 return self._forks.value | |
| 110 | |
| 111 @property | |
| 112 def forks_url(self): | |
| 113 """ | |
| 114 :type: string | |
| 115 """ | |
| 116 self._completeIfNotSet(self._forks_url) | |
| 117 return self._forks_url.value | |
| 118 | |
| 119 @property | |
| 120 def git_pull_url(self): | |
| 121 """ | |
| 122 :type: string | |
| 123 """ | |
| 124 self._completeIfNotSet(self._git_pull_url) | |
| 125 return self._git_pull_url.value | |
| 126 | |
| 127 @property | |
| 128 def git_push_url(self): | |
| 129 """ | |
| 130 :type: string | |
| 131 """ | |
| 132 self._completeIfNotSet(self._git_push_url) | |
| 133 return self._git_push_url.value | |
| 134 | |
| 135 @property | |
| 136 def history(self): | |
| 137 """ | |
| 138 :type: list of :class:`GistHistoryState` | |
| 139 """ | |
| 140 self._completeIfNotSet(self._history) | |
| 141 return self._history.value | |
| 142 | |
| 143 @property | |
| 144 def html_url(self): | |
| 145 """ | |
| 146 :type: string | |
| 147 """ | |
| 148 self._completeIfNotSet(self._html_url) | |
| 149 return self._html_url.value | |
| 150 | |
| 151 @property | |
| 152 def id(self): | |
| 153 """ | |
| 154 :type: string | |
| 155 """ | |
| 156 self._completeIfNotSet(self._id) | |
| 157 return self._id.value | |
| 158 | |
| 159 @property | |
| 160 def owner(self): | |
| 161 """ | |
| 162 :type: :class:`github.NamedUser.NamedUser` | |
| 163 """ | |
| 164 self._completeIfNotSet(self._owner) | |
| 165 return self._owner.value | |
| 166 | |
| 167 @property | |
| 168 def public(self): | |
| 169 """ | |
| 170 :type: bool | |
| 171 """ | |
| 172 self._completeIfNotSet(self._public) | |
| 173 return self._public.value | |
| 174 | |
| 175 @property | |
| 176 def updated_at(self): | |
| 177 """ | |
| 178 :type: datetime.datetime | |
| 179 """ | |
| 180 self._completeIfNotSet(self._updated_at) | |
| 181 return self._updated_at.value | |
| 182 | |
| 183 @property | |
| 184 def url(self): | |
| 185 """ | |
| 186 :type: string | |
| 187 """ | |
| 188 self._completeIfNotSet(self._url) | |
| 189 return self._url.value | |
| 190 | |
| 191 @property | |
| 192 def user(self): | |
| 193 """ | |
| 194 :type: :class:`github.NamedUser.NamedUser` | |
| 195 """ | |
| 196 self._completeIfNotSet(self._user) | |
| 197 return self._user.value | |
| 198 | |
| 199 @property | |
| 200 def version(self): | |
| 201 """ | |
| 202 :type: string | |
| 203 """ | |
| 204 self._completeIfNotSet(self._version) | |
| 205 return self._version.value | |
| 206 | |
| 207 def _initAttributes(self): | |
| 208 self._change_status = github.GithubObject.NotSet | |
| 209 self._comments = github.GithubObject.NotSet | |
| 210 self._comments_url = github.GithubObject.NotSet | |
| 211 self._commits_url = github.GithubObject.NotSet | |
| 212 self._committed_at = github.GithubObject.NotSet | |
| 213 self._created_at = github.GithubObject.NotSet | |
| 214 self._description = github.GithubObject.NotSet | |
| 215 self._files = github.GithubObject.NotSet | |
| 216 self._forks = github.GithubObject.NotSet | |
| 217 self._forks_url = github.GithubObject.NotSet | |
| 218 self._git_pull_url = github.GithubObject.NotSet | |
| 219 self._git_push_url = github.GithubObject.NotSet | |
| 220 self._history = github.GithubObject.NotSet | |
| 221 self._html_url = github.GithubObject.NotSet | |
| 222 self._id = github.GithubObject.NotSet | |
| 223 self._owner = github.GithubObject.NotSet | |
| 224 self._public = github.GithubObject.NotSet | |
| 225 self._updated_at = github.GithubObject.NotSet | |
| 226 self._url = github.GithubObject.NotSet | |
| 227 self._user = github.GithubObject.NotSet | |
| 228 self._version = github.GithubObject.NotSet | |
| 229 | |
| 230 def _useAttributes(self, attributes): | |
| 231 if "change_status" in attributes: # pragma no branch | |
| 232 self._change_status = self._makeClassAttribute(github.CommitStats.CommitStats, attributes["change_status"]) | |
| 233 if "comments" in attributes: # pragma no branch | |
| 234 self._comments = self._makeIntAttribute(attributes["comments"]) | |
| 235 if "comments_url" in attributes: # pragma no branch | |
| 236 self._comments_url = self._makeStringAttribute(attributes["comments_url"]) | |
| 237 if "commits_url" in attributes: # pragma no branch | |
| 238 self._commits_url = self._makeStringAttribute(attributes["commits_url"]) | |
| 239 if "committed_at" in attributes: # pragma no branch | |
| 240 self._committed_at = self._makeDatetimeAttribute(attributes["committed_at"]) | |
| 241 if "created_at" in attributes: # pragma no branch | |
| 242 self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) | |
| 243 if "description" in attributes: # pragma no branch | |
| 244 self._description = self._makeStringAttribute(attributes["description"]) | |
| 245 if "files" in attributes: # pragma no branch | |
| 246 self._files = self._makeDictOfStringsToClassesAttribute(github.GistFile.GistFile, attributes["files"]) | |
| 247 if "forks" in attributes: # pragma no branch | |
| 248 self._forks = self._makeListOfClassesAttribute(github.Gist.Gist, attributes["forks"]) | |
| 249 if "forks_url" in attributes: # pragma no branch | |
| 250 self._forks_url = self._makeStringAttribute(attributes["forks_url"]) | |
| 251 if "git_pull_url" in attributes: # pragma no branch | |
| 252 self._git_pull_url = self._makeStringAttribute(attributes["git_pull_url"]) | |
| 253 if "git_push_url" in attributes: # pragma no branch | |
| 254 self._git_push_url = self._makeStringAttribute(attributes["git_push_url"]) | |
| 255 if "history" in attributes: # pragma no branch | |
| 256 self._history = self._makeListOfClassesAttribute(GistHistoryState, attributes["history"]) | |
| 257 if "html_url" in attributes: # pragma no branch | |
| 258 self._html_url = self._makeStringAttribute(attributes["html_url"]) | |
| 259 if "id" in attributes: # pragma no branch | |
| 260 self._id = self._makeStringAttribute(attributes["id"]) | |
| 261 if "owner" in attributes: # pragma no branch | |
| 262 self._owner = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["owner"]) | |
| 263 if "public" in attributes: # pragma no branch | |
| 264 self._public = self._makeBoolAttribute(attributes["public"]) | |
| 265 if "updated_at" in attributes: # pragma no branch | |
| 266 self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"]) | |
| 267 if "url" in attributes: # pragma no branch | |
| 268 self._url = self._makeStringAttribute(attributes["url"]) | |
| 269 if "user" in attributes: # pragma no branch | |
| 270 self._user = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["user"]) | |
| 271 if "version" in attributes: # pragma no branch | |
| 272 self._version = self._makeStringAttribute(attributes["version"]) |
