Skip to content

Commit b972335

Browse files
committed
Fixed PEP8-Python3 errors
1 parent 577b76e commit b972335

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

graphene/contrib/django/debug/middleware.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from promise import Promise
22
from django.db import connections
33

4-
from ....core.schema import GraphQLSchema
5-
from ....core.types import Field
64
from .sql.tracking import unwrap_cursor, wrap_cursor
75
from .types import DjangoDebug
86

@@ -47,8 +45,10 @@ def resolve(self, next, root, args, context, info):
4745
raise Exception('DjangoDebug cannot be executed in None contexts')
4846
try:
4947
context.django_debug = DjangoDebugContext()
50-
except Exception, e:
51-
raise Exception('DjangoDebug need the context to be writable, context received: {}.'.format(context.__class__.__name__))
48+
except Exception:
49+
raise Exception('DjangoDebug need the context to be writable, context received: {}.'.format(
50+
context.__class__.__name__
51+
))
5252
if info.schema.graphene_schema.T(DjangoDebug) == info.return_type:
5353
return context.django_debug.get_debug_promise()
5454
promise = next(root, args, context, info)

graphene/contrib/django/debug/sql/tracking.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from .types import DjangoDebugSQL, DjangoDebugPostgreSQL
1212

13+
1314
class SQLQueryTriggered(Exception):
1415
"""Thrown when template panel triggers a query"""
1516

graphene/core/types/field.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from collections import OrderedDict
2-
from functools import wraps, partial
2+
from functools import wraps
33

44
import six
55
from graphql.type import GraphQLField, GraphQLInputObjectField

0 commit comments

Comments
 (0)