From 14fb067c4ec4b9fbdeb5de3776572c9fcdd41c9d Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 12 Oct 2021 19:15:13 -0400 Subject: [PATCH] Fix bug and typing in library_datasets.py --- lib/galaxy/webapps/galaxy/api/library_datasets.py | 5 +++-- setup.cfg | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/api/library_datasets.py b/lib/galaxy/webapps/galaxy/api/library_datasets.py index 108a28dbbec..73f2040d852 100644 --- a/lib/galaxy/webapps/galaxy/api/library_datasets.py +++ b/lib/galaxy/webapps/galaxy/api/library_datasets.py @@ -456,8 +456,9 @@ class LibraryDatasetsController(BaseGalaxyAPIController, UsesVisualizationMixin, path = os.path.join(full_dir, path) if unsafe_walk(path, allowlist=[full_dir] + trans.app.config.user_library_import_symlink_allowlist, username=username): # the path is a dir and contains files that symlink outside the user dir - error = 'User attempted to import a path that resolves to a path outside of their import dir: %s -> %s', \ - path, os.path.realpath(path) + error = 'User attempted to import a path that resolves to a path outside of their import dir: %s -> %s' % ( + path, os.path.realpath(path) + ) if trans.app.config.user_library_import_check_permissions: error += ' or is not readable for them.' log.error(error) diff --git a/setup.cfg b/setup.cfg index bf46ca4e271..d177f5b08d0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -741,8 +741,6 @@ check_untyped_defs = False check_untyped_defs = False [mypy-galaxy.webapps.galaxy.api.plugins] check_untyped_defs = False -[mypy-galaxy.webapps.galaxy.api.library_datasets] -check_untyped_defs = False [mypy-galaxy.webapps.galaxy.api.library_contents] check_untyped_defs = False [mypy-galaxy.webapps.galaxy.api.jobs]