diff --git a/heat/common/i18n.py b/heat/common/i18n.py index e2d72811b..47231dcaf 100644 --- a/heat/common/i18n.py +++ b/heat/common/i18n.py @@ -38,7 +38,7 @@ _LE = _translators.log_error _LC = _translators.log_critical -def repr_wraper(klass): +def repr_wrapper(klass): """A decorator that defines __repr__ method under Python 2. Under Python 2 it will encode repr return value to str type. @@ -46,7 +46,7 @@ def repr_wraper(klass): """ if six.PY2: if '__repr__' not in klass.__dict__: - raise ValueError("@repr_wraper cannot be applied " + raise ValueError("@repr_wrapper cannot be applied " "to %s because it doesn't define __repr__()." % klass.__name__) klass._repr = klass.__repr__ diff --git a/heat/engine/attributes.py b/heat/engine/attributes.py index 9f768bf19..e5cae3369 100644 --- a/heat/engine/attributes.py +++ b/heat/engine/attributes.py @@ -18,7 +18,7 @@ import six from heat.common.i18n import _ from heat.common.i18n import _LW -from heat.common.i18n import repr_wraper +from heat.common.i18n import repr_wrapper from heat.engine import constraints as constr from heat.engine import support @@ -124,7 +124,7 @@ class Attribute(object): } -@repr_wraper +@repr_wrapper class Attributes(collections.Mapping): """Models a collection of Resource Attributes.""" diff --git a/heat/engine/dependencies.py b/heat/engine/dependencies.py index 80cce8b26..1c053bb13 100644 --- a/heat/engine/dependencies.py +++ b/heat/engine/dependencies.py @@ -18,14 +18,14 @@ import six from heat.common import exception from heat.common.i18n import _ -from heat.common.i18n import repr_wraper +from heat.common.i18n import repr_wrapper class CircularDependencyException(exception.HeatException): msg_fmt = _("Circular Dependency Found: %(cycle)s") -@repr_wraper +@repr_wrapper @six.python_2_unicode_compatible class Node(object): """A node in a dependency graph.""" @@ -168,7 +168,7 @@ class Graph(collections.defaultdict): raise CircularDependencyException(cycle=six.text_type(graph)) -@repr_wraper +@repr_wrapper @six.python_2_unicode_compatible class Dependencies(object): """Helper class for calculating a dependency graph.""" diff --git a/heat/engine/rsrc_defn.py b/heat/engine/rsrc_defn.py index ff037f8ff..2b11fde4e 100644 --- a/heat/engine/rsrc_defn.py +++ b/heat/engine/rsrc_defn.py @@ -19,7 +19,7 @@ import six from heat.common import exception from heat.common.i18n import _LW -from heat.common.i18n import repr_wraper +from heat.common.i18n import repr_wrapper from heat.engine import function from heat.engine import properties @@ -28,7 +28,7 @@ LOG = log.getLogger(__name__) __all__ = ['ResourceDefinition'] -@repr_wraper +@repr_wrapper class ResourceDefinitionCore(object): """A definition of a resource, independent of any template format.""" diff --git a/heat/engine/scheduler.py b/heat/engine/scheduler.py index 7eb782eac..e67a5e8bb 100644 --- a/heat/engine/scheduler.py +++ b/heat/engine/scheduler.py @@ -23,7 +23,7 @@ from six import reraise as raise_ from heat.common.i18n import _ from heat.common.i18n import _LI -from heat.common.i18n import repr_wraper +from heat.common.i18n import repr_wrapper from heat.common import timeutils LOG = logging.getLogger(__name__) @@ -333,7 +333,7 @@ def wrappertask(task): return wrapper -@repr_wraper +@repr_wrapper class DependencyTaskGroup(object): """Task which manages group of subtasks that have ordering dependencies.""" diff --git a/heat/engine/update.py b/heat/engine/update.py index b233ee9da..b8af73dce 100644 --- a/heat/engine/update.py +++ b/heat/engine/update.py @@ -16,7 +16,7 @@ import six from heat.common import exception from heat.common.i18n import _LI -from heat.common.i18n import repr_wraper +from heat.common.i18n import repr_wrapper from heat.engine import dependencies from heat.engine import scheduler from heat.objects import resource as resource_objects @@ -24,7 +24,7 @@ from heat.objects import resource as resource_objects LOG = logging.getLogger(__name__) -@repr_wraper +@repr_wrapper class StackUpdate(object): """A Task to perform the update of an existing stack to a new template.""" diff --git a/heat/tests/engine/test_scheduler.py b/heat/tests/engine/test_scheduler.py index f56d61c9a..078892460 100644 --- a/heat/tests/engine/test_scheduler.py +++ b/heat/tests/engine/test_scheduler.py @@ -16,7 +16,7 @@ import contextlib import eventlet import six -from heat.common.i18n import repr_wraper +from heat.common.i18n import repr_wrapper from heat.common import timeutils from heat.engine import dependencies from heat.engine import scheduler @@ -825,7 +825,7 @@ class DescriptionTest(common.HeatTestCase): self.assertEqual('o', scheduler.task_description(C())) def test_unicode(self): - @repr_wraper + @repr_wrapper @six.python_2_unicode_compatible class C(object): def __str__(self):