Skip to content

Commit 573101f

Browse files
committed
Renamed from MountedType.mount to MuntedType.mounted
1 parent dda3237 commit 573101f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

graphene/types/argument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def to_arguments(args, extra_args=None):
4747
continue
4848

4949
if isinstance(arg, UnmountedType):
50-
arg = Argument.mount(arg)
50+
arg = Argument.mounted(arg)
5151

5252
if isinstance(arg, (InputField, Field)):
5353
raise ValueError('Expected {} to be Argument, but received {}. Try using Argument({}).'.format(

graphene/types/mountedtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class MountedType(OrderedType):
66

77
@classmethod
8-
def mount(cls, unmounted): # noqa: N802
8+
def mounted(cls, unmounted): # noqa: N802
99
'''
1010
Mount the UnmountedType instance
1111
'''

graphene/types/tests/test_mountedtype.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ def __init__(self, *args, **kwargs):
1313

1414
def test_mounted_type():
1515
unmounted = String()
16-
mounted = Field.mount(unmounted)
16+
mounted = Field.mounted(unmounted)
1717
assert isinstance(mounted, Field)
1818
assert mounted.type == String
1919

2020

2121
def test_mounted_type_custom():
2222
unmounted = String(metadata={'hey': 'yo!'})
23-
mounted = CustomField.mount(unmounted)
23+
mounted = CustomField.mounted(unmounted)
2424
assert isinstance(mounted, CustomField)
2525
assert mounted.type == String
2626
assert mounted.metadata == {'hey': 'yo!'}

graphene/types/unmountedtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_type(self):
2828
raise NotImplementedError("get_type not implemented in {}".format(self))
2929

3030
def mount_as(self, _as):
31-
return _as.mount(self)
31+
return _as.mounted(self)
3232

3333
def Field(self): # noqa: N802
3434
'''

graphene/types/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_field_as(value, _as=None):
4242
elif isinstance(value, UnmountedType):
4343
if _as is None:
4444
return value
45-
return _as.mount(value)
45+
return _as.mounted(value)
4646

4747

4848
def yank_fields_from_attrs(attrs, _as=None, delete=True, sort=True):

0 commit comments

Comments
 (0)