Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/github/File.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 | |
30 class File(github.GithubObject.NonCompletableGithubObject): | |
31 """ | |
32 This class represents Files as returned for example by http://developer.github.com/v3/todo | |
33 """ | |
34 | |
35 @property | |
36 def additions(self): | |
37 """ | |
38 :type: integer | |
39 """ | |
40 return self._additions.value | |
41 | |
42 @property | |
43 def blob_url(self): | |
44 """ | |
45 :type: string | |
46 """ | |
47 return self._blob_url.value | |
48 | |
49 @property | |
50 def changes(self): | |
51 """ | |
52 :type: integer | |
53 """ | |
54 return self._changes.value | |
55 | |
56 @property | |
57 def contents_url(self): | |
58 """ | |
59 :type: string | |
60 """ | |
61 return self._contents_url.value | |
62 | |
63 @property | |
64 def deletions(self): | |
65 """ | |
66 :type: integer | |
67 """ | |
68 return self._deletions.value | |
69 | |
70 @property | |
71 def filename(self): | |
72 """ | |
73 :type: string | |
74 """ | |
75 return self._filename.value | |
76 | |
77 @property | |
78 def patch(self): | |
79 """ | |
80 :type: string | |
81 """ | |
82 return self._patch.value | |
83 | |
84 @property | |
85 def raw_url(self): | |
86 """ | |
87 :type: string | |
88 """ | |
89 return self._raw_url.value | |
90 | |
91 @property | |
92 def sha(self): | |
93 """ | |
94 :type: string | |
95 """ | |
96 return self._sha.value | |
97 | |
98 @property | |
99 def status(self): | |
100 """ | |
101 :type: string | |
102 """ | |
103 return self._status.value | |
104 | |
105 def _initAttributes(self): | |
106 self._additions = github.GithubObject.NotSet | |
107 self._blob_url = github.GithubObject.NotSet | |
108 self._changes = github.GithubObject.NotSet | |
109 self._contents_url = github.GithubObject.NotSet | |
110 self._deletions = github.GithubObject.NotSet | |
111 self._filename = github.GithubObject.NotSet | |
112 self._patch = github.GithubObject.NotSet | |
113 self._raw_url = github.GithubObject.NotSet | |
114 self._sha = github.GithubObject.NotSet | |
115 self._status = github.GithubObject.NotSet | |
116 | |
117 def _useAttributes(self, attributes): | |
118 if "additions" in attributes: # pragma no branch | |
119 self._additions = self._makeIntAttribute(attributes["additions"]) | |
120 if "blob_url" in attributes: # pragma no branch | |
121 self._blob_url = self._makeStringAttribute(attributes["blob_url"]) | |
122 if "changes" in attributes: # pragma no branch | |
123 self._changes = self._makeIntAttribute(attributes["changes"]) | |
124 if "contents_url" in attributes: # pragma no branch | |
125 self._contents_url = self._makeStringAttribute(attributes["contents_url"]) | |
126 if "deletions" in attributes: # pragma no branch | |
127 self._deletions = self._makeIntAttribute(attributes["deletions"]) | |
128 if "filename" in attributes: # pragma no branch | |
129 self._filename = self._makeStringAttribute(attributes["filename"]) | |
130 if "patch" in attributes: # pragma no branch | |
131 self._patch = self._makeStringAttribute(attributes["patch"]) | |
132 if "raw_url" in attributes: # pragma no branch | |
133 self._raw_url = self._makeStringAttribute(attributes["raw_url"]) | |
134 if "sha" in attributes: # pragma no branch | |
135 self._sha = self._makeStringAttribute(attributes["sha"]) | |
136 if "status" in attributes: # pragma no branch | |
137 self._status = self._makeStringAttribute(attributes["status"]) |