diff --git a/src/lsst/cmservice/cli/options.py b/src/lsst/cmservice/cli/options.py index 7ca7b58e..d4bd5c1d 100644 --- a/src/lsst/cmservice/cli/options.py +++ b/src/lsst/cmservice/cli/options.py @@ -1,7 +1,7 @@ from collections.abc import Callable from enum import Enum, auto from functools import partial -from typing import Any, Callable, Type +from typing import Any import click from click.decorators import FC diff --git a/src/lsst/cmservice/db/job.py b/src/lsst/cmservice/db/job.py index ecae5ba9..e40ca4a8 100644 --- a/src/lsst/cmservice/db/job.py +++ b/src/lsst/cmservice/db/job.py @@ -15,8 +15,10 @@ from .step import Step if TYPE_CHECKING: + from .campaign import Campaign from .pipetask_error import PipetaskError from .product_set import ProductSet + from .production import Production from .script import Script from .task_set import TaskSet from .wms_task_report import WmsTaskReport @@ -68,7 +70,11 @@ class Job(Base, ElementMixin): "Production", primaryjoin="Job.parent_id==Group.id", secondary="join(Group, Step).join(Campaign).join(Production)", - secondaryjoin="and_(Group.parent_id==Step.id, Step.parent_id==Campaign.id, Campaign.parent_id==Production.id,) ", + secondaryjoin="and_(" + "Group.parent_id==Step.id, " + "Step.parent_id==Campaign.id, " + "Campaign.parent_id==Production.id, " + ") ", viewonly=True, ) parent_: Mapped["Group"] = relationship("Group", viewonly=True) diff --git a/src/lsst/cmservice/db/step.py b/src/lsst/cmservice/db/step.py index 3d92bf4c..02250550 100644 --- a/src/lsst/cmservice/db/step.py +++ b/src/lsst/cmservice/db/step.py @@ -17,6 +17,7 @@ if TYPE_CHECKING: from .group import Group + from .job import Job from .production import Production from .script import Script from .step_dependency import StepDependency