Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/github/Branch.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 # Copyright 2013 martinqt <m.ki2@laposte.net> # | |
10 # # | |
11 # This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ # | |
12 # # | |
13 # PyGithub is free software: you can redistribute it and/or modify it under # | |
14 # the terms of the GNU Lesser General Public License as published by the Free # | |
15 # Software Foundation, either version 3 of the License, or (at your option) # | |
16 # any later version. # | |
17 # # | |
18 # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # | |
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # | |
20 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # | |
21 # details. # | |
22 # # | |
23 # You should have received a copy of the GNU Lesser General Public License # | |
24 # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. # | |
25 # # | |
26 # ############################################################################## | |
27 | |
28 import github.GithubObject | |
29 | |
30 import github.Commit | |
31 | |
32 | |
33 class Branch(github.GithubObject.NonCompletableGithubObject): | |
34 """ | |
35 This class represents Branchs. The reference can be found here http://developer.github.com/v3/repos/#list-branches | |
36 """ | |
37 | |
38 @property | |
39 def commit(self): | |
40 """ | |
41 :type: :class:`github.Commit.Commit` | |
42 """ | |
43 return self._commit.value | |
44 | |
45 @property | |
46 def name(self): | |
47 """ | |
48 :type: string | |
49 """ | |
50 return self._name.value | |
51 | |
52 def _initAttributes(self): | |
53 self._commit = github.GithubObject.NotSet | |
54 self._name = github.GithubObject.NotSet | |
55 | |
56 def _useAttributes(self, attributes): | |
57 if "commit" in attributes: # pragma no branch | |
58 self._commit = self._makeClassAttribute(github.Commit.Commit, attributes["commit"]) | |
59 if "name" in attributes: # pragma no branch | |
60 self._name = self._makeStringAttribute(attributes["name"]) |