Skip to content

Commit 37a454b

Browse files
committed
Renamed BaseType to InstanceType for code clarity
1 parent 5e708cc commit 37a454b

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

graphene/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Interface,
1212
Mutation,
1313
Scalar,
14-
BaseType,
14+
InstanceType,
1515
LazyType,
1616
Argument,
1717
Field,
@@ -51,7 +51,7 @@
5151
'NonNull',
5252
'signals',
5353
'Schema',
54-
'BaseType',
54+
'InstanceType',
5555
'LazyType',
5656
'ObjectType',
5757
'InputObjectType',

graphene/core/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
)
1212

1313
from .types import (
14-
BaseType,
14+
InstanceType,
1515
LazyType,
1616
Argument,
1717
Field,
@@ -35,7 +35,7 @@
3535
'List',
3636
'NonNull',
3737
'Schema',
38-
'BaseType',
38+
'InstanceType',
3939
'LazyType',
4040
'ObjectType',
4141
'InputObjectType',

graphene/core/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from graphene import signals
1212

1313
from .classtypes.base import ClassType
14-
from .types.base import BaseType
14+
from .types.base import InstanceType
1515

1616

1717
class GraphQLSchema(_GraphQLSchema):
@@ -42,7 +42,7 @@ def T(self, _type):
4242
if not _type:
4343
return
4444
is_classtype = inspect.isclass(_type) and issubclass(_type, ClassType)
45-
is_instancetype = isinstance(_type, BaseType)
45+
is_instancetype = isinstance(_type, InstanceType)
4646
if is_classtype or is_instancetype:
4747
if _type not in self._types:
4848
internal_type = _type.internal_type(self)

graphene/core/types/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .base import BaseType, LazyType, OrderedType
1+
from .base import InstanceType, LazyType, OrderedType
22
from .argument import Argument, ArgumentsGroup, to_arguments
33
from .definitions import List, NonNull
44
# Compatibility import
@@ -8,7 +8,7 @@
88
from .field import Field, InputField
99

1010
__all__ = [
11-
'BaseType',
11+
'InstanceType',
1212
'LazyType',
1313
'OrderedType',
1414
'Argument',

graphene/core/types/argument.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from graphql.core.type import GraphQLArgument
66

77
from ...utils import ProxySnakeDict, to_camel_case
8-
from .base import ArgumentType, BaseType, OrderedType
8+
from .base import ArgumentType, InstanceType, OrderedType
99

1010

1111
class Argument(OrderedType):
@@ -27,7 +27,7 @@ def __repr__(self):
2727
return self.name
2828

2929

30-
class ArgumentsGroup(BaseType):
30+
class ArgumentsGroup(InstanceType):
3131

3232
def __init__(self, *args, **kwargs):
3333
arguments = to_arguments(*args, **kwargs)

graphene/core/types/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
import six
44

55

6-
class BaseType(object):
6+
class InstanceType(object):
77

88
@classmethod
99
def internal_type(cls, schema):
1010
return getattr(cls, 'T', None)
1111

1212

13-
class MountType(BaseType):
13+
class MountType(InstanceType):
1414
parent = None
1515

1616
def mount(self, cls):

0 commit comments

Comments
 (0)