mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-18 12:30:37 +03:00
Improved code lint
This commit is contained in:
parent
ccfed3df3f
commit
6e38e48faf
|
@ -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):
|
||||||
|
|
|
@ -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):
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import copy
|
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from ..types.field import Field, InputField
|
from ..types.field import Field, InputField
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user