mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Fix toolbox.get_tool return type annotation
This commit is contained in:
@@ -832,7 +832,10 @@ class AbstractToolBox(ManagesIntegratedToolPanelMixin):
|
||||
self.get_tool(tool_id, tool_version=tool_version, tool_uuid=tool_uuid, exact=exact, user=user) is not None
|
||||
)
|
||||
|
||||
def get_unprivileged_tool(self, user: model.User, tool_uuid: Union[UUID, str]) -> Optional["Tool"]:
|
||||
def get_unprivileged_tool(self, user: "User", tool_uuid: Union[UUID, str]) -> Optional["Tool"]:
|
||||
return None
|
||||
|
||||
def get_unprivileged_tool_or_none(self, user: "User", tool_uuid: Union[UUID, str]) -> Optional["Tool"]:
|
||||
return None
|
||||
|
||||
def is_missing_shed_tool(self, tool_id: str) -> bool:
|
||||
|
||||
@@ -123,6 +123,7 @@ class ToolsService(ServiceBase):
|
||||
if tool_id is None and tool_uuid is None:
|
||||
raise exceptions.RequestParameterMissingException("Must specify either a tool_id or a tool_uuid.")
|
||||
|
||||
tool: Optional[Tool] = None
|
||||
if tool_uuid:
|
||||
tool = trans.app.toolbox.get_unprivileged_tool(trans.user, tool_uuid=tool_uuid)
|
||||
if not tool:
|
||||
|
||||
Reference in New Issue
Block a user