diff --git a/graphene/types/base.py b/graphene/types/base.py index aa97ed22..fa366a10 100644 --- a/graphene/types/base.py +++ b/graphene/types/base.py @@ -1,6 +1,13 @@ +import six + from ..utils.subclass_with_meta import SubclassWithMeta from ..utils.trim_docstring import trim_docstring +if six.PY3: + from typing import Type +else: + Type = type + class BaseOptions(object): name = None # type: str diff --git a/graphene/types/scalars.py b/graphene/types/scalars.py index dfb63e52..350e2a97 100644 --- a/graphene/types/scalars.py +++ b/graphene/types/scalars.py @@ -4,6 +4,11 @@ from graphql.language.ast import BooleanValue, FloatValue, IntValue, StringValue from .base import BaseOptions, BaseType from .unmountedtype import UnmountedType +if six.PY3: + from typing import Any +else: + Any = object + class ScalarOptions(BaseOptions): pass