Skip to content

Commit 1a68957

Browse files
committed
cleanups
1 parent 84dcdf0 commit 1a68957

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

cwltool/executors.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,11 @@ def run_jobs(self,
144144
else:
145145
runtimeContext.prov_obj = job.prov_obj
146146
assert runtimeContext.prov_obj
147-
process_run_id, reference_locations = runtimeContext.prov_obj._evaluate(
148-
process, job, job_order_object,
149-
runtimeContext.make_fs_access, runtimeContext)
147+
process_run_id, reference_locations = \
148+
runtimeContext.prov_obj.evaluate(
149+
process, job, job_order_object,
150+
runtimeContext.make_fs_access,
151+
runtimeContext)
150152
runtimeContext = runtimeContext.copy()
151153
runtimeContext.process_run_id = process_run_id
152154
runtimeContext.reference_locations = \

cwltool/provenance.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,13 @@ def host_provenance(document):
422422
self.workflow_run_uri, None, self.engine_uuid, datetime.datetime.now())
423423
return (self.workflow_run_uri, self.document)
424424

425-
def _evaluate(self,
426-
process, # type: Process
427-
job, # type: Any
428-
job_order_object, # type: Dict[Text, Text]
429-
make_fs_access, # type: Callable[[Text], StdFsAccess]
430-
runtimeContext # type: RuntimeContext
431-
): # type: (...) -> Tuple[Optional[str], Dict[Text, Text]]
425+
def evaluate(self,
426+
process, # type: Process
427+
job, # type: Any
428+
job_order_object, # type: Dict[Text, Text]
429+
make_fs_access, # type: Callable[[Text], StdFsAccess]
430+
runtimeContext # type: RuntimeContext
431+
): # type: (...) -> Tuple[Optional[str], Dict[Text, Text]]
432432
'''
433433
evaluate the nature of r and
434434
initialize the activity start

cwltool/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import platform
77
import shutil
88
import stat
9+
import pkg_resources
910
from functools import partial # pylint: disable=unused-import
1011
from typing import (IO, Any, AnyStr, Callable, # pylint: disable=unused-import
1112
Dict, Iterable, List, Optional, Text, Tuple, TypeVar,
@@ -22,7 +23,6 @@
2223
import subprocess32 as subprocess # type: ignore # pylint: disable=import-error,unused-import
2324
else:
2425
import subprocess # type: ignore # pylint: disable=unused-import
25-
import pkg_resources
2626

2727
windows_default_container_id = "frolvlad/alpine-bash"
2828

@@ -40,8 +40,7 @@ def versionstring():
4040
pkg = pkg_resources.require("cwltool")
4141
if pkg:
4242
return u"%s %s" % (sys.argv[0], pkg[0].version)
43-
else:
44-
return u"%s %s" % (sys.argv[0], "unknown version")
43+
return u"%s %s" % (sys.argv[0], "unknown version")
4544

4645
def aslist(l): # type: (Any) -> List[Any]
4746
if isinstance(l, list):

cwltool/workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,8 @@ def job(self,
478478

479479
if not self.did_callback:
480480
self.do_output_callback(output_callback) # could have called earlier on line 336;
481-
#depends which one comes first. All steps are completed
482-
#or all outputs have beend produced.
481+
#depends which one comes first. All steps are completed
482+
#or all outputs have been produced.
483483

484484
class Workflow(Process):
485485
def __init__(self,
@@ -506,7 +506,7 @@ def __init__(self,
506506
for index, step in enumerate(self.tool.get("steps", [])):
507507
try:
508508
self.steps.append(WorkflowStep(step, index, loadingContext,
509-
loadingContext.prov_obj))
509+
loadingContext.prov_obj))
510510
except validate.ValidationException as vexc:
511511
if _logger.isEnabledFor(logging.DEBUG):
512512
_logger.exception("Validation failed at")

0 commit comments

Comments
 (0)