Manual implementation of typing of last parameters

This commit is contained in:
Vincent Jacques
2012-06-01 18:54:35 +01:00
parent ed75bb74ec
commit 9954a3fd1b
21 changed files with 160 additions and 77 deletions
+21
View File
@@ -0,0 +1,21 @@
import GithubObject
class InputGitTreeElement:
def __init__( self, path, mode, type, content = GithubObject.NotSet, sha = GithubObject.NotSet ):
self.__path = path
self.__mode = mode
self.__type = type
self.__content = content
self.__sha = sha
def _identity( self ):
identity = {
"path": self.__path,
"mode": self.__mode,
"type": self.__type,
}
if self.__sha is not GithubObject.NotSet:
identity[ "sha" ] = self.__sha
if self.__content is not GithubObject.NotSet:
identity[ "content" ] = self.__content
return identity