mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-06 08:28:03 +01:00
chore: formatting
This commit is contained in:
@@ -460,9 +460,8 @@ def get_auth(args, encode=True, for_git_cli=False):
|
|||||||
elif args.token:
|
elif args.token:
|
||||||
_path_specifier = "file://"
|
_path_specifier = "file://"
|
||||||
if args.token.startswith(_path_specifier):
|
if args.token.startswith(_path_specifier):
|
||||||
args.token = (
|
path_specifier_len = len(_path_specifier)
|
||||||
open(args.token[len(_path_specifier) :], "rt").readline().strip()
|
args.token = open(args.token[path_specifier_len:], "rt").readline().strip()
|
||||||
)
|
|
||||||
if not args.as_app:
|
if not args.as_app:
|
||||||
auth = args.token + ":" + "x-oauth-basic"
|
auth = args.token + ":" + "x-oauth-basic"
|
||||||
else:
|
else:
|
||||||
@@ -673,8 +672,7 @@ def _get_response(request, auth, template):
|
|||||||
def _construct_request(per_page, page, query_args, template, auth, as_app=None):
|
def _construct_request(per_page, page, query_args, template, auth, as_app=None):
|
||||||
querystring = urlencode(
|
querystring = urlencode(
|
||||||
dict(
|
dict(
|
||||||
list({"per_page": per_page, "page": page}.items())
|
list({"per_page": per_page, "page": page}.items()) + list(query_args.items())
|
||||||
+ list(query_args.items())
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user