Permalink
Browse files

Renamed from MountedType.mount to MuntedType.mounted

  • Loading branch information...
1 parent dda3237 commit 573101fc9002600fb7d7e8570745fa9566b58ea6 @syrusakbary syrusakbary committed Dec 18, 2016
@@ -47,7 +47,7 @@ def to_arguments(args, extra_args=None):
continue
if isinstance(arg, UnmountedType):
- arg = Argument.mount(arg)
+ arg = Argument.mounted(arg)
if isinstance(arg, (InputField, Field)):
raise ValueError('Expected {} to be Argument, but received {}. Try using Argument({}).'.format(
@@ -5,7 +5,7 @@
class MountedType(OrderedType):
@classmethod
- def mount(cls, unmounted): # noqa: N802
+ def mounted(cls, unmounted): # noqa: N802
'''
Mount the UnmountedType instance
'''
@@ -13,14 +13,14 @@ def __init__(self, *args, **kwargs):
def test_mounted_type():
unmounted = String()
- mounted = Field.mount(unmounted)
+ mounted = Field.mounted(unmounted)
assert isinstance(mounted, Field)
assert mounted.type == String
def test_mounted_type_custom():
unmounted = String(metadata={'hey': 'yo!'})
- mounted = CustomField.mount(unmounted)
+ mounted = CustomField.mounted(unmounted)
assert isinstance(mounted, CustomField)
assert mounted.type == String
assert mounted.metadata == {'hey': 'yo!'}
@@ -28,7 +28,7 @@ def get_type(self):
raise NotImplementedError("get_type not implemented in {}".format(self))
def mount_as(self, _as):
- return _as.mount(self)
+ return _as.mounted(self)
def Field(self): # noqa: N802
'''
@@ -42,7 +42,7 @@ def get_field_as(value, _as=None):
elif isinstance(value, UnmountedType):
if _as is None:
return value
- return _as.mount(value)
+ return _as.mounted(value)
def yank_fields_from_attrs(attrs, _as=None, delete=True, sort=True):

0 comments on commit 573101f

Please sign in to comment.