mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Lint fixes.
This commit is contained in:
@@ -34,16 +34,19 @@ Blockly.Python['controls_if'] = function(block) {
|
||||
var n = 0;
|
||||
var argument = Blockly.Python.valueToCode(block, 'IF' + n,
|
||||
Blockly.Python.ORDER_NONE) || 'False';
|
||||
var branch = Blockly.Python.statementToCode(block, 'DO' + n) || ' pass\n';
|
||||
var branch = Blockly.Python.statementToCode(block, 'DO' + n) ||
|
||||
Blockly.Python.PASS;
|
||||
var code = 'if ' + argument + ':\n' + branch;
|
||||
for (n = 1; n <= block.elseifCount_; n++) {
|
||||
argument = Blockly.Python.valueToCode(block, 'IF' + n,
|
||||
Blockly.Python.ORDER_NONE) || 'False';
|
||||
branch = Blockly.Python.statementToCode(block, 'DO' + n) || ' pass\n';
|
||||
branch = Blockly.Python.statementToCode(block, 'DO' + n) ||
|
||||
Blockly.Python.PASS;
|
||||
code += 'elif ' + argument + ':\n' + branch;
|
||||
}
|
||||
if (block.elseCount_) {
|
||||
branch = Blockly.Python.statementToCode(block, 'ELSE') || ' pass\n';
|
||||
branch = Blockly.Python.statementToCode(block, 'ELSE') ||
|
||||
Blockly.Python.PASS;
|
||||
code += 'else:\n' + branch;
|
||||
}
|
||||
return code;
|
||||
|
||||
Reference in New Issue
Block a user