Skip to content

Commit 822fe18

Browse files
committed
freshen cwltool/factory.py
1 parent 3cc6a38 commit 822fe18

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

cwltool/factory.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import os
2-
from typing import Any
3-
from typing import Callable as tCallable
4-
from typing import Dict, Optional, Tuple, Union
2+
from typing import Any, Dict, Optional, Union
53

64
from . import load_tool
75
from .context import LoadingContext, RuntimeContext
86
from .errors import WorkflowException
9-
from .executors import SingleJobExecutor
7+
from .executors import JobExecutor, SingleJobExecutor
108
from .process import Process
9+
from .utils import CWLObjectType
1110

1211

1312
class WorkflowStatus(Exception):
14-
def __init__(self, out: Optional[Dict[str, Any]], status: str) -> None:
13+
def __init__(self, out: Optional[CWLObjectType], status: str) -> None:
1514
"""Signaling exception for the status of a Workflow."""
1615
super(WorkflowStatus, self).__init__("Completed %s" % status)
1716
self.out = out
@@ -25,7 +24,7 @@ def __init__(self, t: Process, factory: "Factory") -> None:
2524
self.factory = factory
2625

2726
def __call__(self, **kwargs):
28-
# type: (**Any) -> Union[str, Optional[Dict[str, Any]]]
27+
# type: (**Any) -> Union[str, Optional[CWLObjectType]]
2928
runtime_context = self.factory.runtime_context.copy()
3029
runtime_context.basedir = os.getcwd()
3130
out, status = self.factory.executor(self.t, kwargs, runtime_context)
@@ -38,7 +37,7 @@ def __call__(self, **kwargs):
3837
class Factory(object):
3938
def __init__(
4039
self,
41-
executor: Optional[tCallable[..., Tuple[Optional[Dict[str, Any]], str]]] = None,
40+
executor: Optional[JobExecutor] = None,
4241
loading_context: Optional[LoadingContext] = None,
4342
runtime_context: Optional[RuntimeContext] = None,
4443
) -> None:

0 commit comments

Comments
 (0)