mirror of
https://github.com/google/blockly.git
synced 2026-01-10 10:27:08 +01:00
Resolve warnings in generator code (#3350)
This commit is contained in:
@@ -38,7 +38,7 @@ Blockly.Python['procedures_defreturn'] = function(block) {
|
||||
varName = variable.name;
|
||||
if (block.arguments_.indexOf(varName) == -1) {
|
||||
globals.push(Blockly.Python.variableDB_.getName(varName,
|
||||
Blockly.Variables.NAME_TYPE));
|
||||
Blockly.VARIABLE_CATEGORY_NAME));
|
||||
}
|
||||
}
|
||||
// Add developer variables.
|
||||
@@ -84,7 +84,7 @@ Blockly.Python['procedures_defreturn'] = function(block) {
|
||||
var args = [];
|
||||
for (var i = 0; i < block.arguments_.length; i++) {
|
||||
args[i] = Blockly.Python.variableDB_.getName(block.arguments_[i],
|
||||
Blockly.Variables.NAME_TYPE);
|
||||
Blockly.VARIABLE_CATEGORY_NAME);
|
||||
}
|
||||
var code = 'def ' + funcName + '(' + args.join(', ') + '):\n' +
|
||||
globals + xfix1 + loopTrap + branch + xfix2 + returnValue;
|
||||
|
||||
Reference in New Issue
Block a user