mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
23 lines
715 B
Python
23 lines
715 B
Python
import GithubObject
|
|
|
|
class InputGitTreeElement( object ):
|
|
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
|
|
|
|
@property
|
|
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
|