Commit 2538eb8d authored by Kiesling, Kalin Rose's avatar Kiesling, Kalin Rose
Browse files

import Iterable from correct place based on Python version

parent 09d94007
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
import copy
from collections import Iterable
import sys
from pathlib import Path

import numpy as np

PYTHON_VERSION = sys.version_info
if PYTHON_VERSION.minor < 10:
    from collections import Iterable
else:
    from collections.abc import Iterable

# Provided from OpenMC (commit c8003e0)
# modified to remove f-strings for compatibility with Python 2

+9 −3
Original line number Diff line number Diff line
from collections import Iterable
from numbers import Integral, Real
import sys
import os
from pathlib import Path
import subprocess
@@ -8,6 +8,12 @@ import warnings
from . import checkvalue as cv
from .config import PyGriffinConfig

PYTHON_VERSION = sys.version_info
if PYTHON_VERSION.minor < 10:
    from collections import Iterable
else:
    from collections.abc import Iterable

class PyGriffin:
    """
    Class for connecting PyGriffin inputs and running the problems