Skip to content

Commit 37e1178

Browse files
authored
Merge pull request #54 from lizlooney/pr_no_semicolon_for_python
Removed semicolons in generated python code.
2 parents 98f692f + dbe6dc2 commit 37e1178

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/blocks/mrc_call_python_function.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export const pythonFromBlock = function(
306306
if (block.outputConnection) {
307307
return [code, Order.FUNCTION_CALL];
308308
} else {
309-
return code + ';\n';
309+
return code; + '\n';
310310
}
311311
};
312312

src/blocks/mrc_class_method_def.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ export const pythonFromBlock = function (
399399
'):\n';
400400

401401
if(block.mrcPythonMethodName == '__init__'){
402-
code += generator.INDENT + "self.mechanisms = [];\n"
402+
code += generator.INDENT + "self.mechanisms = []\n";
403403

404404
}
405405

src/blocks/mrc_set_python_variable.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export const pythonFromBlock = function(
270270
if (setPythonVariableBlock.mrcImportModule) {
271271
generator.addImport(setPythonVariableBlock.mrcImportModule);
272272
}
273-
const code = moduleName + '.' + varName + ' = ' + value + ';\n';
273+
const code = moduleName + '.' + varName + ' = ' + value + '\n';
274274
return code;
275275
}
276276
case VAR_KIND_CLASS: {
@@ -279,13 +279,13 @@ export const pythonFromBlock = function(
279279
if (setPythonVariableBlock.mrcImportModule) {
280280
generator.addImport(setPythonVariableBlock.mrcImportModule);
281281
}
282-
const code = className + '.' + varName + ' = ' + value + ';\n';
282+
const code = className + '.' + varName + ' = ' + value + '\n';
283283
return code;
284284
}
285285
case VAR_KIND_INSTANCE: {
286286
const selfValue = generator.valueToCode(block, 'SELF', Order.MEMBER);
287287
const value = generator.valueToCode(block, 'VALUE', Order.NONE);
288-
const code = selfValue + '.' + varName + ' = ' + value + ';\n';
288+
const code = selfValue + '.' + varName + ' = ' + value + '\n';
289289
return code;
290290
}
291291
default:

0 commit comments

Comments
 (0)