Fixed linting

This commit is contained in:
Markus Padourek 2016-08-19 15:37:21 +01:00 committed by GitHub
parent 85928036e0
commit 9d5e428cd2

View File

@ -9,9 +9,11 @@ from ..core.types.scalars import ID, Int, String
from ..utils.wrap_resolver_function import has_context, with_context from ..utils.wrap_resolver_function import has_context, with_context
from .connection import Connection, Edge from .connection import Connection, Edge
def _is_thenable(obj): def _is_thenable(obj):
return callable(getattr(obj, "then", None)) return callable(getattr(obj, "then", None))
class ConnectionField(Field): class ConnectionField(Field):
def __init__(self, type, resolver=None, description='', def __init__(self, type, resolver=None, description='',
@ -29,7 +31,7 @@ class ConnectionField(Field):
**kwargs) **kwargs)
self.connection_type = connection_type or Connection self.connection_type = connection_type or Connection
self.edge_type = edge_type or Edge self.edge_type = edge_type or Edge
def _get_connection_type(self, connection_type, args, context, info, resolved): def _get_connection_type(self, connection_type, args, context, info, resolved):
if isinstance(resolved, self.connection_type): if isinstance(resolved, self.connection_type):
return resolved return resolved