From e0fb5d3facd38e16e751832f4e162eb8613a485d Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Thu, 11 Nov 2021 17:28:22 +0100 Subject: [PATCH] improve typing of lib/galaxy/managers/tools.py. --- lib/galaxy/managers/tools.py | 5 +++++ setup.cfg | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/managers/tools.py b/lib/galaxy/managers/tools.py index d99e8c6af89..8cb347f3dac 100644 --- a/lib/galaxy/managers/tools.py +++ b/lib/galaxy/managers/tools.py @@ -1,4 +1,5 @@ import logging +from typing import TYPE_CHECKING from uuid import uuid4 from sqlalchemy import sql @@ -11,6 +12,9 @@ from .executables import artifact_class log = logging.getLogger(__name__) +if TYPE_CHECKING: + from galaxy.managers.base import OrmFilterParsersType + class DynamicToolManager(ModelManager): """ Manages dynamic tools stored in Galaxy's database. @@ -103,6 +107,7 @@ class DynamicToolManager(ModelManager): class ToolFilterMixin: + orm_filter_parsers: "OrmFilterParsersType" def create_tool_filter(self, attr, op, val): diff --git a/setup.cfg b/setup.cfg index 7ea13e04dc5..8eb64b62547 100644 --- a/setup.cfg +++ b/setup.cfg @@ -549,8 +549,6 @@ check_untyped_defs = False check_untyped_defs = False [mypy-galaxy.managers.users] check_untyped_defs = False -[mypy-galaxy.managers.tools] -check_untyped_defs = False [mypy-galaxy.managers.ratable] check_untyped_defs = False [mypy-galaxy.tools.actions.upload]