Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/github/CommitStatus.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 | |
| 31 | |
| 32 class CommitStatus(github.GithubObject.NonCompletableGithubObject): | |
| 33 """ | |
| 34 This class represents CommitStatuss as returned for example by http://developer.github.com/v3/todo | |
| 35 """ | |
| 36 | |
| 37 @property | |
| 38 def created_at(self): | |
| 39 """ | |
| 40 :type: datetime.datetime | |
| 41 """ | |
| 42 return self._created_at.value | |
| 43 | |
| 44 @property | |
| 45 def creator(self): | |
| 46 """ | |
| 47 :type: :class:`github.NamedUser.NamedUser` | |
| 48 """ | |
| 49 return self._creator.value | |
| 50 | |
| 51 @property | |
| 52 def description(self): | |
| 53 """ | |
| 54 :type: string | |
| 55 """ | |
| 56 return self._description.value | |
| 57 | |
| 58 @property | |
| 59 def id(self): | |
| 60 """ | |
| 61 :type: integer | |
| 62 """ | |
| 63 return self._id.value | |
| 64 | |
| 65 @property | |
| 66 def state(self): | |
| 67 """ | |
| 68 :type: string | |
| 69 """ | |
| 70 return self._state.value | |
| 71 | |
| 72 @property | |
| 73 def target_url(self): | |
| 74 """ | |
| 75 :type: string | |
| 76 """ | |
| 77 return self._target_url.value | |
| 78 | |
| 79 @property | |
| 80 def updated_at(self): | |
| 81 """ | |
| 82 :type: datetime.datetime | |
| 83 """ | |
| 84 return self._updated_at.value | |
| 85 | |
| 86 @property | |
| 87 def url(self): | |
| 88 """ | |
| 89 :type: string | |
| 90 """ | |
| 91 return self._url.value | |
| 92 | |
| 93 def _initAttributes(self): | |
| 94 self._created_at = github.GithubObject.NotSet | |
| 95 self._creator = github.GithubObject.NotSet | |
| 96 self._description = github.GithubObject.NotSet | |
| 97 self._id = github.GithubObject.NotSet | |
| 98 self._state = github.GithubObject.NotSet | |
| 99 self._target_url = github.GithubObject.NotSet | |
| 100 self._updated_at = github.GithubObject.NotSet | |
| 101 self._url = github.GithubObject.NotSet | |
| 102 | |
| 103 def _useAttributes(self, attributes): | |
| 104 if "created_at" in attributes: # pragma no branch | |
| 105 self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) | |
| 106 if "creator" in attributes: # pragma no branch | |
| 107 self._creator = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["creator"]) | |
| 108 if "description" in attributes: # pragma no branch | |
| 109 self._description = self._makeStringAttribute(attributes["description"]) | |
| 110 if "id" in attributes: # pragma no branch | |
| 111 self._id = self._makeIntAttribute(attributes["id"]) | |
| 112 if "state" in attributes: # pragma no branch | |
| 113 self._state = self._makeStringAttribute(attributes["state"]) | |
| 114 if "target_url" in attributes: # pragma no branch | |
| 115 self._target_url = self._makeStringAttribute(attributes["target_url"]) | |
| 116 if "updated_at" in attributes: # pragma no branch | |
| 117 self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"]) | |
| 118 if "url" in attributes: # pragma no branch | |
| 119 self._url = self._makeStringAttribute(attributes["url"]) |
