diff --git a/cmdx.py b/cmdx.py index 96f8ed1..983f323 100644 --- a/cmdx.py +++ b/cmdx.py @@ -268,16 +268,16 @@ def add_metaclass(metaclass): def wrapper(cls): orig_vars = cls.__dict__.copy() - slots = orig_vars.get('__slots__') + slots = orig_vars.get("__slots__") if slots is not None: if isinstance(slots, str): slots = [slots] for slots_var in slots: orig_vars.pop(slots_var) - orig_vars.pop('__dict__', None) - orig_vars.pop('__weakref__', None) - if hasattr(cls, '__qualname__'): - orig_vars['__qualname__'] = cls.__qualname__ + orig_vars.pop("__dict__", None) + orig_vars.pop("__weakref__", None) + if hasattr(cls, "__qualname__"): + orig_vars["__qualname__"] = cls.__qualname__ return metaclass(cls.__name__, cls.__bases__, orig_vars) return wrapper @@ -2843,7 +2843,7 @@ def isArray(self): @property def arrayIndices(self): if not self._mplug.isArray: - raise TypeError('{} is not an array'.format(self.path())) + raise TypeError("{} is not an array".format(self.path())) # Convert from `p_OpenMaya_py2.rItemNot3Strs` to list return list(self._mplug.getExistingArrayAttributeIndices()) @@ -3806,10 +3806,15 @@ def connections(self, 2 >>> b["arrayAttr"] = Long(array=True) >>> b["arrayAttr"][0] >> a["ihi"] + >>> b["arrayAttr"][1] >> a["visibility"] >>> a["ihi"].connection() == b True >>> a["ihi"].connection(plug=True) == b["arrayAttr"][0] True + >>> a["visibility"].connection(plug=True) == b["arrayAttr"][1] + True + >>> b["arrayAttr"][1].connection(plug=True) == a["visibility"] + True """