mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 03:11:09 +00:00
Manual implementation of typing of last parameters
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user