From e9bef0385e24450a32febfc0e4ec0ca3fd09123b Mon Sep 17 00:00:00 2001 From: jinyan1214 Date: Tue, 13 Aug 2024 18:08:37 -0700 Subject: [PATCH] Fix needed imports when merging ruff dafe fixes --- .../regionalGroundMotion/HazardSimulationEQ.py | 1 + .../regionalGroundMotion/ScenarioForecast.py | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/performRegionalEventSimulation/regionalGroundMotion/HazardSimulationEQ.py b/modules/performRegionalEventSimulation/regionalGroundMotion/HazardSimulationEQ.py index e1c3f4ab1..a242a8eb9 100644 --- a/modules/performRegionalEventSimulation/regionalGroundMotion/HazardSimulationEQ.py +++ b/modules/performRegionalEventSimulation/regionalGroundMotion/HazardSimulationEQ.py @@ -550,6 +550,7 @@ def hazard_job(hazard_info): # noqa: C901, D103, PLR0914, PLR0915 if importlib.util.find_spec('jpype') is None: subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'JPype1']) # noqa: S603 import jpype + from jpype import imports from jpype.types import * # noqa: F403 memory_total = psutil.virtual_memory().total / (1024.0**3) diff --git a/modules/performRegionalEventSimulation/regionalGroundMotion/ScenarioForecast.py b/modules/performRegionalEventSimulation/regionalGroundMotion/ScenarioForecast.py index 94fbca023..7664f6e62 100644 --- a/modules/performRegionalEventSimulation/regionalGroundMotion/ScenarioForecast.py +++ b/modules/performRegionalEventSimulation/regionalGroundMotion/ScenarioForecast.py @@ -99,6 +99,7 @@ if importlib.util.find_spec('jpype') is None: subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'JPype1']) # noqa: S603 import jpype + from jpype import imports from jpype.types import * # noqa: F403 memory_total = psutil.virtual_memory().total / (1024.0**3)