diff --git a/openmc/cell.py b/openmc/cell.py index 956d727d74f..0af6ea2b451 100644 --- a/openmc/cell.py +++ b/openmc/cell.py @@ -1,8 +1,8 @@ from collections.abc import Iterable from math import cos, sin, pi from numbers import Real -import lxml.etree as ET +import lxml.etree as ET import numpy as np from uncertainties import UFloat diff --git a/openmc/data/library.py b/openmc/data/library.py index 397be3faf19..de9de27443d 100644 --- a/openmc/data/library.py +++ b/openmc/data/library.py @@ -1,8 +1,8 @@ import os -import lxml.etree as ET import pathlib import h5py +import lxml.etree as ET import openmc from openmc._xml import clean_indentation, reorder_attributes diff --git a/openmc/deplete/nuclide.py b/openmc/deplete/nuclide.py index e2067a8e359..d055c2e3751 100644 --- a/openmc/deplete/nuclide.py +++ b/openmc/deplete/nuclide.py @@ -8,8 +8,8 @@ from collections import namedtuple, defaultdict from warnings import warn from numbers import Real -import lxml.etree as ET +import lxml.etree as ET import numpy as np from openmc.checkvalue import check_type diff --git a/openmc/element.py b/openmc/element.py index 01651bebb6f..f9cf102f7ce 100644 --- a/openmc/element.py +++ b/openmc/element.py @@ -1,4 +1,5 @@ import re + import lxml.etree as ET import openmc.checkvalue as cv diff --git a/openmc/filter.py b/openmc/filter.py index 8eb81432ff9..f2bbf2f5050 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -3,9 +3,9 @@ import hashlib from itertools import product from numbers import Real, Integral -import lxml.etree as ET import warnings +import lxml.etree as ET import numpy as np import pandas as pd diff --git a/openmc/filter_expansion.py b/openmc/filter_expansion.py index f05f39fe9b6..b9860846fda 100644 --- a/openmc/filter_expansion.py +++ b/openmc/filter_expansion.py @@ -1,4 +1,5 @@ from numbers import Integral, Real + import lxml.etree as ET import openmc.checkvalue as cv diff --git a/openmc/lattice.py b/openmc/lattice.py index 926a016efe3..d281f6e7692 100644 --- a/openmc/lattice.py +++ b/openmc/lattice.py @@ -4,8 +4,8 @@ from math import sqrt, floor from numbers import Real import types -import lxml.etree as ET +import lxml.etree as ET import numpy as np import openmc diff --git a/openmc/material.py b/openmc/material.py index 6b71f56a8d0..1f5496f15ea 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -8,8 +8,8 @@ import typing # imported separately as py3.8 requires typing.Iterable import warnings from typing import Optional, List, Union, Dict -import lxml.etree as ET +import lxml.etree as ET import numpy as np import h5py diff --git a/openmc/model/model.py b/openmc/model/model.py index 9da834e139e..a60960b2bad 100644 --- a/openmc/model/model.py +++ b/openmc/model/model.py @@ -7,10 +7,10 @@ from numbers import Integral from tempfile import NamedTemporaryFile import warnings -import lxml.etree as ET from typing import Optional, Dict import h5py +import lxml.etree as ET import openmc import openmc._xml as xml diff --git a/openmc/plots.py b/openmc/plots.py index 626056d79ae..b38b51a59c6 100644 --- a/openmc/plots.py +++ b/openmc/plots.py @@ -1,10 +1,10 @@ from collections.abc import Iterable, Mapping from numbers import Integral, Real from pathlib import Path -import lxml.etree as ET from typing import Optional import h5py +import lxml.etree as ET import numpy as np import openmc diff --git a/openmc/settings.py b/openmc/settings.py index 5d0800ac13d..b4e615a2a17 100644 --- a/openmc/settings.py +++ b/openmc/settings.py @@ -1,4 +1,3 @@ -import os from collections.abc import Iterable, Mapping, MutableSequence from enum import Enum import itertools @@ -7,11 +6,11 @@ from pathlib import Path import typing # required to prevent typing.Union namespace overwriting Union from typing import Optional + import lxml.etree as ET import openmc.checkvalue as cv from openmc.stats.multivariate import MeshSpatial - from . import (RegularMesh, SourceBase, MeshSource, IndependentSource, VolumeCalculation, WeightWindows, WeightWindowGenerator) from ._xml import clean_indentation, get_text, reorder_attributes diff --git a/openmc/source.py b/openmc/source.py index c339d6ed806..1ba90c92130 100644 --- a/openmc/source.py +++ b/openmc/source.py @@ -7,8 +7,8 @@ import typing # imported separately as py3.8 requires typing.Iterable # also required to prevent typing.Union namespace overwriting Union from typing import Optional, Sequence -import lxml.etree as ET +import lxml.etree as ET import numpy as np import h5py diff --git a/openmc/surface.py b/openmc/surface.py index a684f83feaf..a16b6712d6c 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -3,9 +3,9 @@ from copy import deepcopy import math from numbers import Real -import lxml.etree as ET from warnings import warn, catch_warnings, simplefilter +import lxml.etree as ET import numpy as np from .checkvalue import check_type, check_value, check_length, check_greater_than diff --git a/openmc/tally_derivative.py b/openmc/tally_derivative.py index 779ca619f2a..ff918c1b3c6 100644 --- a/openmc/tally_derivative.py +++ b/openmc/tally_derivative.py @@ -1,4 +1,5 @@ from numbers import Integral + import lxml.etree as ET import openmc.checkvalue as cv diff --git a/openmc/trigger.py b/openmc/trigger.py index 8a165526cf6..c7d9e9240bb 100644 --- a/openmc/trigger.py +++ b/openmc/trigger.py @@ -1,5 +1,6 @@ from collections.abc import Iterable from numbers import Real + import lxml.etree as ET import openmc.checkvalue as cv diff --git a/openmc/universe.py b/openmc/universe.py index bc122b03dc7..2e86ab05a9b 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -1,24 +1,20 @@ import math -import typing from abc import ABC, abstractmethod from collections.abc import Iterable -from copy import deepcopy from numbers import Integral, Real from pathlib import Path from tempfile import TemporaryDirectory -import lxml.etree as ET import warnings import h5py +import lxml.etree as ET import numpy as np import openmc import openmc.checkvalue as cv - from ._xml import get_text from .checkvalue import check_type, check_value from .mixin import IDManagerMixin -from .plots import _SVG_COLORS from .surface import _BOUNDARY_TYPES diff --git a/openmc/volume.py b/openmc/volume.py index 90882267d7b..df19def1eac 100644 --- a/openmc/volume.py +++ b/openmc/volume.py @@ -1,11 +1,11 @@ from collections.abc import Iterable, Mapping from numbers import Real, Integral -import lxml.etree as ET import warnings +import h5py +import lxml.etree as ET import numpy as np import pandas as pd -import h5py from uncertainties import ufloat import openmc diff --git a/openmc/weight_windows.py b/openmc/weight_windows.py index 2b545a976ee..f5936438977 100644 --- a/openmc/weight_windows.py +++ b/openmc/weight_windows.py @@ -12,7 +12,6 @@ from openmc.mesh import MeshBase, RectilinearMesh, CylindricalMesh, SphericalMesh, UnstructuredMesh import openmc.checkvalue as cv from openmc.checkvalue import PathLike - from ._xml import get_text, clean_indentation from .mixin import IDManagerMixin diff --git a/tests/unit_tests/test_cell.py b/tests/unit_tests/test_cell.py index 888a0ef88f3..95c8249bb33 100644 --- a/tests/unit_tests/test_cell.py +++ b/tests/unit_tests/test_cell.py @@ -1,11 +1,9 @@ import lxml.etree as ET - import numpy as np from uncertainties import ufloat import openmc import pytest - from tests.unit_tests import assert_unbounded from openmc.data import atomic_mass, AVOGADRO diff --git a/tests/unit_tests/test_deplete_nuclide.py b/tests/unit_tests/test_deplete_nuclide.py index 07db57bd6d1..6482d76a592 100644 --- a/tests/unit_tests/test_deplete_nuclide.py +++ b/tests/unit_tests/test_deplete_nuclide.py @@ -1,7 +1,8 @@ """Tests for the openmc.deplete.Nuclide class.""" -import lxml.etree as ET import copy + +import lxml.etree as ET import numpy as np import pytest from openmc.deplete import nuclide diff --git a/tests/unit_tests/test_lattice.py b/tests/unit_tests/test_lattice.py index 97cd898435f..6fa32760e65 100644 --- a/tests/unit_tests/test_lattice.py +++ b/tests/unit_tests/test_lattice.py @@ -1,6 +1,6 @@ from math import sqrt -import lxml.etree as ET +import lxml.etree as ET import openmc import pytest diff --git a/tests/unit_tests/test_universe.py b/tests/unit_tests/test_universe.py index 630e66df3ab..46d4ec3f734 100644 --- a/tests/unit_tests/test_universe.py +++ b/tests/unit_tests/test_universe.py @@ -1,5 +1,4 @@ import lxml.etree as ET - import numpy as np import openmc import pytest