From 50aa7be701a14248c3df8903da2ac668d51e0133 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 18 Oct 2018 05:54:36 -0500 Subject: [PATCH] Make sure ABCs come from collections.abc --- openmc/arithmetic.py | 2 +- openmc/data/photon.py | 3 ++- openmc/data/resonance_covariance.py | 2 +- openmc/filter.py | 3 ++- openmc/mesh.py | 2 +- openmc/mgxs/groups.py | 2 +- openmc/universe.py | 3 ++- tests/unit_tests/test_data_decay.py | 2 +- tests/unit_tests/test_data_misc.py | 2 +- tests/unit_tests/test_data_neutron.py | 2 +- tests/unit_tests/test_data_photon.py | 2 +- tests/unit_tests/test_data_thermal.py | 2 +- 12 files changed, 15 insertions(+), 12 deletions(-) diff --git a/openmc/arithmetic.py b/openmc/arithmetic.py index 4a5e7486a..91e2f1ed4 100644 --- a/openmc/arithmetic.py +++ b/openmc/arithmetic.py @@ -1,6 +1,6 @@ import sys import copy -from collections import Iterable +from collections.abc import Iterable import numpy as np import pandas as pd diff --git a/openmc/data/photon.py b/openmc/data/photon.py index 5f932b185..e0f71d5ce 100644 --- a/openmc/data/photon.py +++ b/openmc/data/photon.py @@ -1,4 +1,5 @@ -from collections import OrderedDict, Mapping, Callable +from collections import OrderedDict +from collections.abc import Mapping, Callable from copy import deepcopy from io import StringIO from numbers import Integral, Real diff --git a/openmc/data/resonance_covariance.py b/openmc/data/resonance_covariance.py index 300e6dbf6..9e80e52f2 100644 --- a/openmc/data/resonance_covariance.py +++ b/openmc/data/resonance_covariance.py @@ -1,4 +1,4 @@ -from collections import MutableSequence +from collections.abc import MutableSequence import warnings import io import copy diff --git a/openmc/filter.py b/openmc/filter.py index 6c904e61d..ef68a4961 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -1,5 +1,6 @@ from abc import ABCMeta -from collections import Iterable, OrderedDict +from collections import OrderedDict +from collections.abc import Iterable import copy import hashlib from itertools import product diff --git a/openmc/mesh.py b/openmc/mesh.py index f7cba22f8..f454a6f88 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -1,4 +1,4 @@ -from collections import Iterable +from collections.abc import Iterable from numbers import Real, Integral from xml.etree import ElementTree as ET import sys diff --git a/openmc/mgxs/groups.py b/openmc/mgxs/groups.py index 6dd56e8e7..338bc4b00 100644 --- a/openmc/mgxs/groups.py +++ b/openmc/mgxs/groups.py @@ -1,4 +1,4 @@ -from collections import Iterable +from collections.abc import Iterable from numbers import Real import copy import sys diff --git a/openmc/universe.py b/openmc/universe.py index 294b114dd..044da12e3 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -1,4 +1,5 @@ -from collections import OrderedDict, Iterable +from collections import OrderedDict +from collections.abc import Iterable from copy import copy, deepcopy from numbers import Integral, Real import random diff --git a/tests/unit_tests/test_data_decay.py b/tests/unit_tests/test_data_decay.py index be8ad7d64..b925506df 100644 --- a/tests/unit_tests/test_data_decay.py +++ b/tests/unit_tests/test_data_decay.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -from collections import Mapping +from collections.abc import Mapping import os from math import log diff --git a/tests/unit_tests/test_data_misc.py b/tests/unit_tests/test_data_misc.py index 34686b567..46a9dbd02 100644 --- a/tests/unit_tests/test_data_misc.py +++ b/tests/unit_tests/test_data_misc.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -from collections import Mapping +from collections.abc import Mapping import os import numpy as np diff --git a/tests/unit_tests/test_data_neutron.py b/tests/unit_tests/test_data_neutron.py index bbebcb34a..3cf036aa2 100644 --- a/tests/unit_tests/test_data_neutron.py +++ b/tests/unit_tests/test_data_neutron.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -from collections import Mapping, Callable +from collections.abc import Mapping, Callable import os import numpy as np diff --git a/tests/unit_tests/test_data_photon.py b/tests/unit_tests/test_data_photon.py index eecef73c4..5036d08fd 100644 --- a/tests/unit_tests/test_data_photon.py +++ b/tests/unit_tests/test_data_photon.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -from collections import Mapping, Callable +from collections.abc import Mapping, Callable import os import numpy as np diff --git a/tests/unit_tests/test_data_thermal.py b/tests/unit_tests/test_data_thermal.py index 9def78b38..7d7d4e964 100644 --- a/tests/unit_tests/test_data_thermal.py +++ b/tests/unit_tests/test_data_thermal.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -from collections import Callable +from collections.abc import Callable import os import numpy as np