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