mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-26 19:43:56 +03:00
Fixed lint errors
This commit is contained in:
parent
c9e7f67ff9
commit
9ea10f562c
|
@ -1,7 +1,7 @@
|
||||||
import copy
|
import copy
|
||||||
import inspect
|
import inspect
|
||||||
from functools import partial
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
from functools import partial
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ from graphql.core.utils.schema_printer import print_schema
|
||||||
|
|
||||||
from graphene import signals
|
from graphene import signals
|
||||||
|
|
||||||
|
from ..plugins import CamelCase, Plugin
|
||||||
from .classtypes.base import ClassType
|
from .classtypes.base import ClassType
|
||||||
from .types.base import BaseType
|
from .types.base import BaseType
|
||||||
from ..plugins import Plugin, CamelCase
|
|
||||||
|
|
||||||
|
|
||||||
class GraphQLSchema(_GraphQLSchema):
|
class GraphQLSchema(_GraphQLSchema):
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from functools import total_ordering, partial
|
from functools import partial, total_ordering
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from ...utils import to_camel_case
|
|
||||||
|
|
||||||
|
|
||||||
class BaseType(object):
|
class BaseType(object):
|
||||||
|
|
||||||
|
@ -136,6 +134,7 @@ class NamedType(BaseType):
|
||||||
|
|
||||||
|
|
||||||
class GroupNamedType(BaseType):
|
class GroupNamedType(BaseType):
|
||||||
|
|
||||||
def __init__(self, *types):
|
def __init__(self, *types):
|
||||||
self.types = types
|
self.types = types
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ from ..classtypes.inputobjecttype import InputObjectType
|
||||||
from ..classtypes.mutation import Mutation
|
from ..classtypes.mutation import Mutation
|
||||||
from ..exceptions import SkipField
|
from ..exceptions import SkipField
|
||||||
from .argument import ArgumentsGroup, snake_case_args
|
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
|
from .definitions import NonNull
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,6 +145,7 @@ class InputField(NamedType, OrderedType):
|
||||||
|
|
||||||
|
|
||||||
class FieldsGroupType(GroupNamedType):
|
class FieldsGroupType(GroupNamedType):
|
||||||
|
|
||||||
def iter_types(self, schema):
|
def iter_types(self, schema):
|
||||||
for field in sorted(self.types):
|
for field in sorted(self.types):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Plugin(object):
|
class Plugin(object):
|
||||||
|
|
||||||
def contribute_to_schema(self, schema):
|
def contribute_to_schema(self, schema):
|
||||||
self.schema = schema
|
self.schema = schema
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from .base import Plugin
|
|
||||||
|
|
||||||
from ..core.types.base import GroupNamedType
|
from ..core.types.base import GroupNamedType
|
||||||
from ..utils import memoize, to_camel_case
|
from ..utils import memoize, to_camel_case
|
||||||
|
from .base import Plugin
|
||||||
|
|
||||||
|
|
||||||
def camelcase_named_type(schema, type):
|
def camelcase_named_type(schema, type):
|
||||||
|
@ -10,6 +9,7 @@ def camelcase_named_type(schema, type):
|
||||||
|
|
||||||
|
|
||||||
class CamelCase(Plugin):
|
class CamelCase(Plugin):
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
def transform_group(self, _type):
|
def transform_group(self, _type):
|
||||||
new_type = _type.__class__(*_type.types)
|
new_type = _type.__class__(*_type.types)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user