From a515d1b67d57115bc2c8437bac68b0c528328cbd Mon Sep 17 00:00:00 2001 From: Andrew Konstantinov <105389353+execveat@users.noreply.github.com> Date: Tue, 24 Oct 2023 01:06:15 +0200 Subject: [PATCH] Python 2 compatibility --- src/gqlspection/GQLSubQuery.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gqlspection/GQLSubQuery.py b/src/gqlspection/GQLSubQuery.py index bb27659..823bdfb 100644 --- a/src/gqlspection/GQLSubQuery.py +++ b/src/gqlspection/GQLSubQuery.py @@ -8,7 +8,6 @@ # TODO: Figure out if it's better to split this monstrosity in two classes -@python_2_unicode_compatible class QueryBuilder(object): def __init__(self, query, indent=4): # Used for building the query string @@ -57,7 +56,7 @@ def close_brace(self): def add_field(self, field, args=None): line = field if args: - line += '(' + ', '.join(f'{k}: {v}' for k, v in args.items()) + ')' + line += '(' + ', '.join(['{k}: {v}'.format(k=k, v=v) for k, v in args.items()]) + ')' self.add_line(line) def build(self):