From 77767226e32d3a8867c9dc8536d2c4daa6005fc1 Mon Sep 17 00:00:00 2001 From: Michael Currin Date: Thu, 19 Dec 2019 11:09:12 +0200 Subject: [PATCH] style: Update with formatter --- ghgql/lib/__init__.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ghgql/lib/__init__.py b/ghgql/lib/__init__.py index 0184305..c101836 100644 --- a/ghgql/lib/__init__.py +++ b/ghgql/lib/__init__.py @@ -59,12 +59,14 @@ def fetch_github_data(query, variables=None): print(f"Writing payload to: {ERROR_PAYLOAD_PATH}") write_file(payload, ERROR_PAYLOAD_PATH) message = text.prettify(errors) - raise ValueError(f"Error requesting Github. Errors:\n{message}") + raise ValueError( + f"Error requesting Github. Errors:\n{message}") data = resp.get('data', None) if data is None: message = text.prettify(resp) - raise ValueError(f"Error requesting Github. Details:\n{message}") + raise ValueError( + f"Error requesting Github. Details:\n{message}") except ValueError as e: text.eprint(f"Requested failed - attempt #{i+1}/{MAX_ATTEMPTS}") if i+1 == MAX_ATTEMPTS: @@ -163,7 +165,8 @@ def process_variables(args): """ if args: if len(args) % 2: - raise ValueError(f'Incomplete key-value pairs provided: {" ".join(args)}') + raise ValueError( + f'Incomplete key-value pairs provided: {" ".join(args)}') variables = dict(zip(args[::2], args[1::2])) # TODO: Make this clear that you use start and it becomes since. @@ -177,7 +180,7 @@ def process_variables(args): return variables - return None + return {} def process_args(args):