mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Use importlib.resources.files() for ToolShed config_schema.yml
This commit is contained in:
@@ -65,6 +65,7 @@ from ..version import VERSION_MAJOR, VERSION_MINOR
|
||||
try:
|
||||
from importlib.resources import files # type: ignore[attr-defined]
|
||||
except ImportError:
|
||||
# Python < 3.9
|
||||
from importlib_resources import files # type: ignore[no-redef]
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -44,6 +44,7 @@ from galaxy.web_stack import get_app_kwds
|
||||
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__)
|
||||
|
||||
@@ -18,10 +18,16 @@ from galaxy.util import string_as_bool
|
||||
from galaxy.version import VERSION, VERSION_MAJOR, VERSION_MINOR
|
||||
from galaxy.web.formatting import expand_pretty_datetime_format
|
||||
|
||||
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__)
|
||||
|
||||
TOOLSHED_APP_NAME = 'tool_shed'
|
||||
TOOLSHED_CONFIG_SCHEMA_PATH = 'lib/tool_shed/webapp/config_schema.yml'
|
||||
TOOLSHED_CONFIG_SCHEMA_PATH = files('tool_shed.webapp') / 'config_schema.yml'
|
||||
|
||||
|
||||
class ToolShedAppConfiguration(BaseAppConfiguration, CommonConfigurationMixin):
|
||||
|
||||
Reference in New Issue
Block a user