Skip to content

Commit 3c2b282

Browse files
committed
Fix linter errors.
1 parent 2069aaa commit 3c2b282

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

epoxy/metaclasses/union.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
1-
from collections import OrderedDict
2-
from functools import partial
3-
from graphql.core.type import GraphQLObjectType
4-
from graphql.core.type.definition import GraphQLInterfaceType, GraphQLUnionType
5-
from ..utils.get_declared_fields import get_declared_fields
6-
from ..utils.make_default_resolver import make_default_resolver
1+
from graphql.core.type.definition import GraphQLUnionType
2+
73
from ..utils.no_implementation_registration import no_implementation_registration
8-
from ..utils.weak_ref_holder import WeakRefHolder
9-
from ..utils.yank_potential_fields import yank_potential_fields
104

115

12-
class ObjectTypeMeta(type):
6+
class UnionMeta(type):
137
def __new__(mcs, name, bases, attrs):
148
if attrs.pop('abstract', False):
15-
return super(ObjectTypeMeta, mcs).__new__(mcs, name, bases, attrs)
9+
return super(UnionMeta, mcs).__new__(mcs, name, bases, attrs)
1610

1711
with no_implementation_registration():
1812
union_type = GraphQLUnionType(
1913
name,
20-
types=mcs._get_types()
14+
types=mcs._get_types(),
2115
description=attrs.get('__doc__'),
2216
)
2317

2418
mcs._register(union_type)
25-
cls = super(ObjectTypeMeta, mcs).__new__(mcs, name, bases, attrs)
19+
cls = super(UnionMeta, mcs).__new__(mcs, name, bases, attrs)
2620
cls.T = union_type
2721
cls._registry = mcs._get_registry()
2822

epoxy/registry.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
GraphQLUnionType
1717
)
1818
from graphql.core.type.definition import GraphQLType, get_named_type
19-
from graphql.core.type.schema import type_map_reducer
20-
2119
import six
22-
from .bases.object_type import ObjectTypeBase
20+
2321
from .bases.class_type_creator import ClassTypeCreator
22+
from .bases.object_type import ObjectTypeBase
2423
from .field import Field
2524
from .metaclasses.interface import InterfaceMeta
2625
from .metaclasses.object_type import ObjectTypeMeta
27-
from .thunk import AttributeTypeThunk, ResolveThunk, RootTypeThunk, ThunkList, TransformThunkList
26+
from .metaclasses.union import UnionMeta
27+
from .thunk import AttributeTypeThunk, RootTypeThunk, ThunkList, TransformThunkList
2828
from .utils.enum_to_graphql_enum import enum_to_graphql_enum
2929
from .utils.maybe_t import maybe_t
3030
from .utils.method_dispatch import method_dispatch

tox.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@ commands =
1616
py{py,27,33,34,35}: py.test {posargs}
1717

1818
[testenv:flake8]
19+
basepython=python3.5
1920
deps = flake8
20-
commands = flake8 epoxy
21+
commands =
22+
pip install -e .
23+
flake8 epoxy
2124

2225
[testenv:import-order]
2326
basepython=python3.5
2427
deps =
2528
import-order
2629
graphql-core>=0.4.7b0
2730
six>=1.10.0
28-
commands = import-order epoxy
31+
commands =
32+
pip install -e .
33+
import-order epoxy

0 commit comments

Comments
 (0)