Fixed lint errors

This commit is contained in:
Syrus Akbary 2015-12-06 14:37:44 -08:00
parent c9e7f67ff9
commit 9ea10f562c
6 changed files with 9 additions and 8 deletions

View File

@ -1,7 +1,7 @@
import copy
import inspect
from functools import partial
from collections import OrderedDict
from functools import partial
import six

View File

@ -10,9 +10,9 @@ from graphql.core.utils.schema_printer import print_schema
from graphene import signals
from ..plugins import CamelCase, Plugin
from .classtypes.base import ClassType
from .types.base import BaseType
from ..plugins import Plugin, CamelCase
class GraphQLSchema(_GraphQLSchema):

View File

@ -1,10 +1,8 @@
from collections import OrderedDict
from functools import total_ordering, partial
from functools import partial, total_ordering
import six
from ...utils import to_camel_case
class BaseType(object):
@ -136,6 +134,7 @@ class NamedType(BaseType):
class GroupNamedType(BaseType):
def __init__(self, *types):
self.types = types

View File

@ -9,7 +9,7 @@ from ..classtypes.inputobjecttype import InputObjectType
from ..classtypes.mutation import Mutation
from ..exceptions import SkipField
from .argument import ArgumentsGroup, snake_case_args
from .base import LazyType, NamedType, MountType, OrderedType, GroupNamedType
from .base import GroupNamedType, LazyType, MountType, NamedType, OrderedType
from .definitions import NonNull
@ -145,6 +145,7 @@ class InputField(NamedType, OrderedType):
class FieldsGroupType(GroupNamedType):
def iter_types(self, schema):
for field in sorted(self.types):
try:

View File

@ -1,4 +1,5 @@
class Plugin(object):
def contribute_to_schema(self, schema):
self.schema = schema

View File

@ -1,7 +1,6 @@
from .base import Plugin
from ..core.types.base import GroupNamedType
from ..utils import memoize, to_camel_case
from .base import Plugin
def camelcase_named_type(schema, type):
@ -10,6 +9,7 @@ def camelcase_named_type(schema, type):
class CamelCase(Plugin):
@memoize
def transform_group(self, _type):
new_type = _type.__class__(*_type.types)