mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Manual implementation of typing of last parameters
This commit is contained in:
@@ -9,6 +9,7 @@ import Repository
|
||||
import NamedUser
|
||||
import Plan
|
||||
import Organization
|
||||
import InputFileContent
|
||||
import Event
|
||||
|
||||
class NamedUser( GithubObject.GithubObject ):
|
||||
@@ -144,10 +145,11 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
|
||||
def create_gist( self, public, files, description = GithubObject.NotSet ):
|
||||
assert isinstance( public, bool ), public
|
||||
assert all( isinstance( element, InputFileContent.InputFileContent ) for element in files.itervalues() ), files
|
||||
assert description is GithubObject.NotSet or isinstance( description, ( str, unicode ) ), description
|
||||
post_parameters = {
|
||||
"public": public,
|
||||
"files": files,
|
||||
"files": { key : value._identity() for key, value in files.iteritems() },
|
||||
}
|
||||
if description is not GithubObject.NotSet:
|
||||
post_parameters[ "description" ] = description
|
||||
|
||||
Reference in New Issue
Block a user