mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-23 15:10:48 +03:00
Fixed linting
This commit is contained in:
parent
85928036e0
commit
9d5e428cd2
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user