Skip to content

Commit

Permalink
Python tasks now expect indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
joergen7 committed Jan 2, 2016
1 parent e59664f commit b917c5d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,12 @@ public String toScript() throws NotBoundException, NotDerivableException {
// report stage in file sizes and report error when something is missing
buf.append( comment( "report stage in file sizes and report error when something is missing" ) );
buf.append( getStageInCollect() ).append( '\n' );


// insert body prefix
buf.append( comment( "insert body prefix" ) );
buf.append( getBodyPrefix() ).append( '\n' );


// insert function body
buf.append( comment( "insert function body" ) );
buf.append( ticket.getBody() ).append( '\n' );
Expand Down Expand Up @@ -332,6 +337,11 @@ protected String declareString( String outputName ) {
protected String getImport() {
return "";
}

@SuppressWarnings("static-method")
protected String getBodyPrefix() {
return "";
}

protected abstract String callFunction( String name, String... argValue );
protected abstract String callProcedure( String name, String... argValue );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ protected String forEach( String listName, String elementName, String body ) {
"for "+elementName+" in "+listName+":\n "
+body.replace( "\n", "\n " )+"\n";
}

@Override
protected String getBodyPrefix() {
return "if True:\n";
}

@Override
protected String getImport() {
Expand Down

0 comments on commit b917c5d

Please sign in to comment.