Skip to content

Commit cf9d7cd

Browse files
authored
Merge pull request #1225 from common-workflow-language/moved_indent
schema_salad.validate.indent -> sourceline.indent
2 parents 4642316 + c068d40 commit cf9d7cd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cwltool/procgenerator.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from .process import Process, shortname
33
from .load_tool import load_tool
44
from schema_salad import validate
5+
from schema_salad.sourceline import indent
56
from .errors import WorkflowException
67
from .context import RuntimeContext, LoadingContext
78
from typing import (Any, Callable, Dict, Generator, Iterable, List,
@@ -82,7 +83,7 @@ def __init__(self,
8283
_logger.exception("Validation exception")
8384
raise WorkflowException(
8485
u"Tool definition %s failed validation:\n%s" %
85-
(toolpath_object["run"], validate.indent(str(vexc))))
86+
(toolpath_object["run"], indent(str(vexc))))
8687

8788
def job(self,
8889
job_order, # type: Mapping[Text, Text]
@@ -107,7 +108,7 @@ def result(self,
107108
_logger.exception("Validation exception")
108109
raise WorkflowException(
109110
u"Tool definition %s failed validation:\n%s" %
110-
(jobout["runProcess"], validate.indent(str(vexc))))
111+
(jobout["runProcess"], indent(str(vexc))))
111112

112113
if "runInputs" in jobout:
113114
runinputs = cast(MutableMapping[Text, Any], jobout["runInputs"])

cwltool/workflow.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import threading
1616
from ruamel.yaml.comments import CommentedMap
1717
from schema_salad import validate
18-
from schema_salad.sourceline import SourceLine
18+
from schema_salad.sourceline import SourceLine, indent
1919
from six import string_types, iteritems
2020
from six.moves import range
2121
from future.utils import raise_from
@@ -644,7 +644,7 @@ def __init__(self,
644644
_logger.exception("Validation exception")
645645
raise_from(WorkflowException(
646646
u"Tool definition %s failed validation:\n%s" %
647-
(toolpath_object["run"], validate.indent(str(vexc)))), vexc)
647+
(toolpath_object["run"], indent(str(vexc)))), vexc)
648648

649649
validation_errors = []
650650
self.tool = toolpath_object = copy.deepcopy(toolpath_object)

0 commit comments

Comments
 (0)