From 573101fc9002600fb7d7e8570745fa9566b58ea6 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Sun, 18 Dec 2016 14:03:03 -0800 Subject: [PATCH] Renamed from MountedType.mount to MuntedType.mounted --- graphene/types/argument.py | 2 +- graphene/types/mountedtype.py | 2 +- graphene/types/tests/test_mountedtype.py | 4 ++-- graphene/types/unmountedtype.py | 2 +- graphene/types/utils.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/graphene/types/argument.py b/graphene/types/argument.py index 8d486f1b..c884b017 100644 --- a/graphene/types/argument.py +++ b/graphene/types/argument.py @@ -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( diff --git a/graphene/types/mountedtype.py b/graphene/types/mountedtype.py index e2d0b7a3..dae0cc61 100644 --- a/graphene/types/mountedtype.py +++ b/graphene/types/mountedtype.py @@ -5,7 +5,7 @@ from .unmountedtype import UnmountedType class MountedType(OrderedType): @classmethod - def mount(cls, unmounted): # noqa: N802 + def mounted(cls, unmounted): # noqa: N802 ''' Mount the UnmountedType instance ''' diff --git a/graphene/types/tests/test_mountedtype.py b/graphene/types/tests/test_mountedtype.py index 3df7e7fb..0bc39a2f 100644 --- a/graphene/types/tests/test_mountedtype.py +++ b/graphene/types/tests/test_mountedtype.py @@ -13,14 +13,14 @@ class CustomField(Field): 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!'} diff --git a/graphene/types/unmountedtype.py b/graphene/types/unmountedtype.py index 4dfe762c..9698795c 100644 --- a/graphene/types/unmountedtype.py +++ b/graphene/types/unmountedtype.py @@ -28,7 +28,7 @@ class UnmountedType(OrderedType): 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 ''' diff --git a/graphene/types/utils.py b/graphene/types/utils.py index 3c70711c..e2603155 100644 --- a/graphene/types/utils.py +++ b/graphene/types/utils.py @@ -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):