diff --git a/lib/galaxy/util/resources.py b/lib/galaxy/util/resources.py index 071921a68b77..0e90245539bd 100644 --- a/lib/galaxy/util/resources.py +++ b/lib/galaxy/util/resources.py @@ -2,20 +2,17 @@ """ import sys -if sys.version_info >= (3, 12): - from importlib.resources import ( - Anchor, - as_file, - files, - ) - from importlib.resources.abc import Traversable -elif sys.version_info >= (3, 9): - from importlib.abc import Traversable +if sys.version_info >= (3, 9): from importlib.resources import ( as_file, files, Package as Anchor, ) + + if sys.version_info >= (3, 12): + from importlib.resources.abc import Traversable + else: + from importlib.abc import Traversable else: from importlib_resources import ( as_file,