mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Use six.add_metaclass to be compatible with Python 2 and 3
This commit is contained in:
parent
24af2829b9
commit
de009f4c34
12 changed files with 30 additions and 54 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue