Improved code lint

This commit is contained in:
Syrus Akbary 2016-06-15 21:40:54 -07:00
parent ccfed3df3f
commit 6e38e48faf
6 changed files with 10 additions and 5 deletions

View File

@ -4,11 +4,11 @@ import six
from graphql_relay import from_global_id, node_definitions, to_global_id from graphql_relay import from_global_id, node_definitions, to_global_id
from .connection import Connection
from ..types.field import Field from ..types.field import Field
from ..types.interface import Interface from ..types.interface import Interface
from ..types.objecttype import ObjectTypeMeta, ObjectType from ..types.objecttype import ObjectType, ObjectTypeMeta
from ..types.options import Options from ..types.options import Options
from .connection import Connection
class NodeMeta(ObjectTypeMeta): class NodeMeta(ObjectTypeMeta):

View File

@ -4,8 +4,8 @@ from graphql_relay import to_global_id
from ...types import ObjectType, Schema from ...types import ObjectType, Schema
from ...types.scalars import String from ...types.scalars import String
from ..node import Node
from ..connection import Connection from ..connection import Connection
from ..node import Node
class MyNode(Node, ObjectType): class MyNode(Node, ObjectType):

View File

@ -1,4 +1,3 @@
import copy
import six import six

View File

@ -10,6 +10,7 @@ class Structure(UnmountedType):
A structure is a GraphQL type instance that A structure is a GraphQL type instance that
wraps a main type with certain structure. wraps a main type with certain structure.
''' '''
def __init__(self, of_type, *args, **kwargs): def __init__(self, of_type, *args, **kwargs):
super(Structure, self).__init__(*args, **kwargs) super(Structure, self).__init__(*args, **kwargs)
self.of_type = of_type self.of_type = of_type

View File

@ -1,8 +1,10 @@
import datetime import datetime
import pytest import pytest
from graphene.utils.get_graphql_type import get_graphql_type from graphene.utils.get_graphql_type import get_graphql_type
from graphql import GraphQLBoolean, GraphQLFloat, GraphQLInt, GraphQLString, GraphQLScalarType, graphql from graphql import (GraphQLBoolean, GraphQLFloat, GraphQLInt,
GraphQLScalarType, GraphQLString, graphql)
from graphql.language import ast from graphql.language import ast
from ..field import Field from ..field import Field
@ -12,6 +14,7 @@ from ..schema import Schema
class DatetimeScalar(Scalar): class DatetimeScalar(Scalar):
class Meta: class Meta:
name = 'DateTime' name = 'DateTime'
@ -53,6 +56,7 @@ GraphQLDateTimeType = GraphQLScalarType(
class DatetimeScalarGraphQL(Scalar): class DatetimeScalarGraphQL(Scalar):
class Meta: class Meta:
graphql_type = GraphQLDateTimeType graphql_type = GraphQLDateTimeType

View File

@ -1,4 +1,5 @@
from collections import OrderedDict from collections import OrderedDict
from ..types.field import Field, InputField from ..types.field import Field, InputField