Use six.add_metaclass to be compatible with Python 2 and 3

This commit is contained in:
Paul Romano 2016-10-06 18:30:42 -05:00
parent 24af2829b9
commit de009f4c34
12 changed files with 30 additions and 54 deletions

View file

@ -2,6 +2,7 @@ from abc import ABCMeta, abstractmethod
from collections import Iterable, Callable
from numbers import Real, Integral
from six import add_metaclass
import numpy as np
import openmc.checkvalue as cv
@ -11,11 +12,9 @@ INTERPOLATION_SCHEME = {1: 'histogram', 2: 'linear-linear', 3: 'linear-log',
4: 'log-linear', 5: 'log-log'}
@add_metaclass(ABCMeta)
class Function1D(EqualityMixin):
"""A function of one independent variable with HDF5 support."""
__metaclass__ = ABCMeta
@abstractmethod
def __call__(self): pass