From 84b055e15bf1bc08697129f154f33a55e4252086 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Wed, 26 Oct 2022 20:24:23 +0100 Subject: [PATCH] reordered imports to avoid circular imports --- openmc/__init__.py | 4 ++-- openmc/source.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openmc/__init__.py b/openmc/__init__.py index ca21bf17b8..9615024f21 100644 --- a/openmc/__init__.py +++ b/openmc/__init__.py @@ -10,11 +10,11 @@ from openmc.material import * from openmc.plots import * from openmc.region import * from openmc.volume import * -from openmc.source import * from openmc.weight_windows import * -from openmc.settings import * from openmc.surface import * from openmc.universe import * +from openmc.source import * +from openmc.settings import * from openmc.lattice import * from openmc.filter import * from openmc.filter_expansion import * diff --git a/openmc/source.py b/openmc/source.py index 7be7b838aa..fd5b737e54 100644 --- a/openmc/source.py +++ b/openmc/source.py @@ -84,7 +84,7 @@ class Source: parameters: Optional[str] = None, strength: float = 1.0, particle: str = 'neutron', - domains: Optional[Union[openmc.Cell, openmc.Material, 'openmc.Universe']] = None + domains: Optional[Union[openmc.Cell, openmc.Material, openmc.Universe]] = None ): self._space = None self._angle = None @@ -257,7 +257,7 @@ class Source: return element @classmethod - def from_xml_element(cls, elem: ET.Element) -> 'openmc.Source': + def from_xml_element(cls, elem: ET.Element) -> openmc.Source: """Generate source from an XML element Parameters