diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-01-06 20:45:01 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-01-06 22:33:11 +0100 |
commit | 5db8b0a93a11374940401e1bd73549558a85b105 (patch) | |
tree | f9d5bbf3b04667dd80dbafc62e5b417295a57453 | |
parent | e4fa4b5248a594f8cc0839b06b77c4828bea2cd1 (diff) | |
download | pycadf-5db8b0a93a11374940401e1bd73549558a85b105.tar.gz |
Python 3: use six.with_metaclass
Instead of using (Python 2):
__metaclass__ = ...
or (Pyhon 3):
class Foo(metaclass=...):
we use six.with_metaclass (Python 2 and 3):
class Foo(six.with_metaclass(Meta, Base)):
Change-Id: Ie934cd14dfb81a018f838294b768e69dff16af5b
-rw-r--r-- | pycadf/cadftype.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pycadf/cadftype.py b/pycadf/cadftype.py index 89dffd5..5702e4f 100644 --- a/pycadf/cadftype.py +++ b/pycadf/cadftype.py @@ -17,6 +17,7 @@ # under the License. import abc +import six from pycadf.openstack.common import jsonutils @@ -73,9 +74,8 @@ class ValidatorDescriptor(object): raise ValueError('%s must not be None.' % self.name) -class CADFAbstractType(object): +class CADFAbstractType(six.with_metaclass(abc.ABCMeta, object)): """The abstract base class for all CADF (complex) data types (classes).""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def is_valid(self, value): |