@@ -424,7 +424,7 @@ def get_github_repo_url(args, repository):
424424 if args .prefer_ssh :
425425 # The git_pull_url value is always https for gists, so we need to transform it to ssh form
426426 repo_url = re .sub ('^https?:\/\/(.+)\/(.+)\.git$' , r'git@\1:\2.git' , repository ['git_pull_url' ])
427- repo_url = re .sub ('^git@gist\.' , 'git@' , repo_url ) # strip gist subdomain for better hostkey compatibility
427+ repo_url = re .sub ('^git@gist\.' , 'git@' , repo_url ) # strip gist subdomain for better hostkey compatibility
428428 else :
429429 repo_url = repository ['git_pull_url' ]
430430 return repo_url
@@ -497,9 +497,11 @@ def retrieve_data_gen(args, template, query_args=None, single_request=False):
497497 if single_request :
498498 break
499499
500+
500501def retrieve_data (args , template , query_args = None , single_request = False ):
501502 return list (retrieve_data_gen (args , template , query_args , single_request ))
502503
504+
503505def get_query_args (query_args = None ):
504506 if not query_args :
505507 query_args = {}
@@ -903,18 +905,22 @@ def backup_pulls(args, repo_cwd, repository, repos_template):
903905 pull_states = ['open' , 'closed' ]
904906 for pull_state in pull_states :
905907 query_args ['state' ] = pull_state
906- _pulls = retrieve_data_gen (args ,
907- _pulls_template ,
908- query_args = query_args )
908+ _pulls = retrieve_data_gen (
909+ args ,
910+ _pulls_template ,
911+ query_args = query_args
912+ )
909913 for pull in _pulls :
910914 if args .since and pull ['updated_at' ] < args .since :
911915 break
912916 if not args .since or pull ['updated_at' ] >= args .since :
913917 pulls [pull ['number' ]] = pull
914918 else :
915- _pulls = retrieve_data_gen (args ,
916- _pulls_template ,
917- query_args = query_args )
919+ _pulls = retrieve_data_gen (
920+ args ,
921+ _pulls_template ,
922+ query_args = query_args
923+ )
918924 for pull in _pulls :
919925 if args .since and pull ['updated_at' ] < args .since :
920926 break
0 commit comments