mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Put private methods after public ones
This commit is contained in:
@@ -31,6 +31,24 @@ class UserKey( object ):
|
||||
self.__completeIfNeeded( self.__url )
|
||||
return self.__url
|
||||
|
||||
def delete( self ):
|
||||
pass
|
||||
|
||||
def edit( self, title = None, key = None ):
|
||||
post_parameters = {
|
||||
}
|
||||
if title is not None:
|
||||
post_parameters[ "title" ] = title
|
||||
if key is not None:
|
||||
post_parameters[ "key" ] = key
|
||||
result = self.__github._dataRequest(
|
||||
"PATCH",
|
||||
"https://api.github.com/user",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
self.__useAttributes( result )
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__id = None
|
||||
self.__key = None
|
||||
@@ -52,24 +70,6 @@ class UserKey( object ):
|
||||
self.__useAttributes( result )
|
||||
self.__completed = True
|
||||
|
||||
def delete( self ):
|
||||
pass
|
||||
|
||||
def edit( self, title = None, key = None ):
|
||||
post_parameters = {
|
||||
}
|
||||
if title is not None:
|
||||
post_parameters[ "title" ] = title
|
||||
if key is not None:
|
||||
post_parameters[ "key" ] = key
|
||||
result = self.__github._dataRequest(
|
||||
"PATCH",
|
||||
"https://api.github.com/user",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
self.__useAttributes( result )
|
||||
|
||||
def __useAttributes( self, attributes ):
|
||||
#@todo No need to check if attribute is in attributes when attribute is mandatory
|
||||
if "id" in attributes:
|
||||
|
||||
Reference in New Issue
Block a user