Removed slots

This commit is contained in:
Syrus Akbary 2016-06-04 18:54:08 -07:00
parent ff7bf20f6d
commit 2b676743ae
8 changed files with 3 additions and 10 deletions

View File

@ -10,7 +10,6 @@ from ..utils.orderedtype import OrderedType
class Argument(GraphQLArgument, OrderedType): class Argument(GraphQLArgument, OrderedType):
__slots__ = ('name', 'type', 'default_value', 'description', 'creation_counter')
def __init__(self, type, default_value=None, description=None, name=None, _creation_counter=None): def __init__(self, type, default_value=None, description=None, name=None, _creation_counter=None):
self.name = name self.name = name
@ -43,7 +42,7 @@ class Argument(GraphQLArgument, OrderedType):
def to_arguments(*args, **extra): def to_arguments(*args, **extra):
from .proxy import TypeProxy from .proxy import TypeProxy
args = list(filter(None, args))+[extra] args = list(filter(None, args)) + [extra]
arguments = [] arguments = []
iter_arguments = chain(*[arg.items() for arg in args]) iter_arguments = chain(*[arg.items() for arg in args])
arguments_names = set() arguments_names = set()

View File

@ -11,7 +11,6 @@ from .proxy import TypeProxy
class GrapheneEnumType(GrapheneType, GraphQLEnumType): class GrapheneEnumType(GrapheneType, GraphQLEnumType):
__slots__ = ('graphene_type', '_name', '_description', '_values', '_value_lookup', '_name_lookup')
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
graphene_type = kwargs.pop('graphene_type') graphene_type = kwargs.pop('graphene_type')

View File

@ -38,7 +38,6 @@ class AbstractField(object):
class Field(AbstractField, GraphQLField, OrderedType): class Field(AbstractField, GraphQLField, OrderedType):
__slots__ = ('_name', '_type', '_args', '_resolver', 'deprecation_reason', 'description', 'source', 'attname', 'parent', 'creation_counter', 'required')
def __init__(self, type, args=None, resolver=None, source=None, deprecation_reason=None, name=None, description=None, required=False, _creation_counter=None, **extra_args): def __init__(self, type, args=None, resolver=None, source=None, deprecation_reason=None, name=None, description=None, required=False, _creation_counter=None, **extra_args):
self.name = name self.name = name
@ -114,7 +113,6 @@ class Field(AbstractField, GraphQLField, OrderedType):
class InputField(AbstractField, GraphQLInputObjectField, OrderedType): class InputField(AbstractField, GraphQLInputObjectField, OrderedType):
__slots__ = ('_name', '_type', 'default_value', 'description', 'required')
def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None): def __init__(self, type, default_value=None, description=None, name=None, required=False, _creation_counter=None):
self.name = name self.name = name

View File

@ -7,7 +7,7 @@ from .proxy import TypeProxy
class GrapheneInputObjectType(GrapheneFieldsType, GraphQLInputObjectType): class GrapheneInputObjectType(GrapheneFieldsType, GraphQLInputObjectType):
__slots__ = ('graphene_type', '_name', '_description', '_fields', '_field_map') pass
class InputObjectTypeMeta(ClassTypeMeta): class InputObjectTypeMeta(ClassTypeMeta):

View File

@ -5,7 +5,7 @@ from .definitions import ClassTypeMeta, GrapheneFieldsType, FieldMap
class GrapheneInterfaceType(GrapheneFieldsType, GraphQLInterfaceType): class GrapheneInterfaceType(GrapheneFieldsType, GraphQLInterfaceType):
__slots__ = ('graphene_type', '_name', '_description', '_fields', '_field_map', 'resolve_type') pass
class InterfaceTypeMeta(ClassTypeMeta): class InterfaceTypeMeta(ClassTypeMeta):

View File

@ -7,7 +7,6 @@ from .interface import GrapheneInterfaceType
class GrapheneObjectType(GrapheneFieldsType, GraphQLObjectType): class GrapheneObjectType(GrapheneFieldsType, GraphQLObjectType):
__slots__ = ('graphene_type', '_name', '_description', '_fields', '_field_map', '_is_type_of', '_provided_interfaces', '_interfaces')
@property @property
def is_type_of(self): def is_type_of(self):

View File

@ -6,7 +6,6 @@ from .proxy import TypeProxy
class GrapheneScalarType(GrapheneType, GraphQLScalarType): class GrapheneScalarType(GrapheneType, GraphQLScalarType):
__slots__ = ('graphene_type', '_name', '_description', '_serialize', '_parse_value', '_parse_literal')
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
GrapheneType.__init__(self, *args, **kwargs) GrapheneType.__init__(self, *args, **kwargs)

View File

@ -8,7 +8,6 @@ from ..utils.get_graphql_type import get_graphql_type
class Schema(GraphQLSchema): class Schema(GraphQLSchema):
__slots__ = '_query', '_mutation', '_subscription', '_type_map', '_directives', '_implementations', '_possible_type_map', '_types', '_executor'
def __init__(self, query=None, mutation=None, subscription=None, directives=None, types=None, executor=None): def __init__(self, query=None, mutation=None, subscription=None, directives=None, types=None, executor=None):
if query: if query: