From 37f6f67e797d8e47a2feb12a36d3a1ccd729b56d Mon Sep 17 00:00:00 2001 From: Zohar Malamant Date: Wed, 7 Feb 2024 09:55:04 +0100 Subject: [PATCH] Don't import from top-level ert module This is to speed up importing selected submodules of `ert`. --- src/subscript/csv_merge/csv_merge.py | 2 +- src/subscript/csv_stack/csv_stack.py | 2 +- src/subscript/fmuobs/fmuobs.py | 2 +- src/subscript/params2csv/params2csv.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/subscript/csv_merge/csv_merge.py b/src/subscript/csv_merge/csv_merge.py index 6b010484f..132156720 100755 --- a/src/subscript/csv_merge/csv_merge.py +++ b/src/subscript/csv_merge/csv_merge.py @@ -8,7 +8,7 @@ from typing import Dict, List, Optional import pandas as pd -from ert import ErtScript +from ert.config import ErtScript from ert.shared.plugins.plugin_manager import hook_implementation # type: ignore from subscript import __version__, getLogger diff --git a/src/subscript/csv_stack/csv_stack.py b/src/subscript/csv_stack/csv_stack.py index 2bc89eeac..d6fdd3ed3 100755 --- a/src/subscript/csv_stack/csv_stack.py +++ b/src/subscript/csv_stack/csv_stack.py @@ -8,7 +8,7 @@ from typing import Pattern import pandas as pd -from ert import ErtScript +from ert.config import ErtScript from ert.shared.plugins.plugin_manager import hook_implementation # type: ignore from subscript import __version__, getLogger diff --git a/src/subscript/fmuobs/fmuobs.py b/src/subscript/fmuobs/fmuobs.py index ef8c37d10..f7eb7c5b4 100644 --- a/src/subscript/fmuobs/fmuobs.py +++ b/src/subscript/fmuobs/fmuobs.py @@ -10,7 +10,7 @@ import pandas as pd import yaml -from ert import ErtScript +from ert.config import ErtScript from ert.shared.plugins.plugin_manager import hook_implementation # type: ignore from subscript import __version__, getLogger diff --git a/src/subscript/params2csv/params2csv.py b/src/subscript/params2csv/params2csv.py index 63c628db5..a7685c217 100755 --- a/src/subscript/params2csv/params2csv.py +++ b/src/subscript/params2csv/params2csv.py @@ -11,7 +11,7 @@ from glob import glob import pandas as pd -from ert import ErtScript +from ert.config import ErtScript from ert.shared.plugins.plugin_manager import hook_implementation # type: ignore from subscript import __version__, getLogger