Skip to content

Commit 8754d85

Browse files
committed
printrdf(): Refactor function before adding tests
1 parent 83b5566 commit 8754d85

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cwltool/cwlrdf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def visitor(t):
2020
return g
2121

2222

23-
def printrdf(wf, ctx, sr, stdout):
24-
# type: (Process, ContextType, Text, IO[Any]) -> None
25-
stdout.write(gather(wf, ctx).serialize(format=sr).decode('utf-8'))
23+
def printrdf(wf, ctx, sr):
24+
# type: (Process, ContextType, Text) -> Text
25+
return gather(wf, ctx).serialize(format=sr).decode('utf-8')
2626

2727

2828
def lastpart(uri): # type: (Any) -> Text

cwltool/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ def main(argsl=None, # type: List[str]
839839
return 0
840840

841841
if args.print_rdf:
842-
printrdf(tool, document_loader.ctx, args.rdf_serializer, stdout)
842+
stdout.write(printrdf(tool, document_loader.ctx, args.rdf_serializer))
843843
return 0
844844

845845
if args.print_dot:

0 commit comments

Comments
 (0)