From 8b1bfd433cf90cd21872a24c5198b1948484f38c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 29 May 2023 18:34:22 -0400 Subject: [PATCH] chore: formatting --- github_backup/github_backup.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/github_backup/github_backup.py b/github_backup/github_backup.py index 7bf021d..b9ff345 100644 --- a/github_backup/github_backup.py +++ b/github_backup/github_backup.py @@ -460,9 +460,8 @@ def get_auth(args, encode=True, for_git_cli=False): elif args.token: _path_specifier = "file://" if args.token.startswith(_path_specifier): - args.token = ( - open(args.token[len(_path_specifier) :], "rt").readline().strip() - ) + path_specifier_len = len(_path_specifier) + args.token = open(args.token[path_specifier_len:], "rt").readline().strip() if not args.as_app: auth = args.token + ":" + "x-oauth-basic" else: @@ -673,8 +672,7 @@ def _get_response(request, auth, template): def _construct_request(per_page, page, query_args, template, auth, as_app=None): querystring = urlencode( dict( - list({"per_page": per_page, "page": page}.items()) - + list(query_args.items()) + list({"per_page": per_page, "page": page}.items()) + list(query_args.items()) ) )