Skip to content

Commit

Permalink
Consolidate use of galaxy.util.resources
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Apr 15, 2024
1 parent 2317db7 commit c286930
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
6 changes: 1 addition & 5 deletions lib/galaxy/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
read_properties_from_file,
running_from_source,
)
from galaxy.util.resources import files
from galaxy.util.themes import flatten_theme
from ..version import (
VERSION_MAJOR,
Expand All @@ -60,11 +61,6 @@
if TYPE_CHECKING:
from galaxy.model import User

if sys.version_info >= (3, 9):
from importlib.resources import files
else:
from importlib_resources import files

log = logging.getLogger(__name__)

DEFAULT_LOCALE_FORMAT = "%a %b %e %H:%M:%S %Y"
Expand Down
7 changes: 1 addition & 6 deletions lib/galaxy/webapps/base/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
safe_makedirs,
unicodify,
)
from galaxy.util.resources import files
from galaxy.util.sanitize_html import sanitize_html
from galaxy.version import VERSION
from galaxy.web.framework import (
Expand All @@ -60,12 +61,6 @@
)
from galaxy.web.framework.middleware.static import CacheableStaticURLParser as Static

try:
from importlib.resources import files # type: ignore[attr-defined]
except ImportError:
# Python < 3.9
from importlib_resources import files # type: ignore[no-redef]

log = logging.getLogger(__name__)


Expand Down

0 comments on commit c286930

Please sign in to comment.