From 089b6d04ef5609c5f0c205f773472d0f3afbc722 Mon Sep 17 00:00:00 2001 From: Ethan Peterson Date: Sat, 22 Feb 2020 08:03:35 -0500 Subject: [PATCH] removed __init_subclass__ since it's not in python 3.5 --- openmc/surface.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openmc/surface.py b/openmc/surface.py index 0c1513a527..62ea83456c 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -79,10 +79,6 @@ class Surface(IDManagerMixin, metaclass=ABCMeta): # Value - coefficient value self._coefficients = {} - def __init_subclass__(cls, **kwargs): - super().__init_subclass__(**kwargs) - _SURFACE_CLASSES[cls._type] = cls - def __neg__(self): return Halfspace(self, '-') @@ -2613,3 +2609,5 @@ class Halfspace(Region): # Return translated surface return type(self)(memo[key], self.side) + +_SURFACE_CLASSES = {cls._type: cls for cls in Surface.__subclasses__()}