Skip to content

Commit 21e046d

Browse files
committed
Removed the code that set variables to None in Init
1 parent b603d47 commit 21e046d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/editor/extended_python_generator.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,8 @@ export class ExtendedPythonGenerator extends PythonGenerator {
5757
}
5858

5959
defineClassVariables(workspace: Blockly.Workspace) : string{
60-
const classVars = Blockly.Variables.allUsedVarModels(workspace);
61-
6260
let variableDefinitions = '';
63-
64-
for (let i = 0; i < classVars.length; i++) {
65-
variableDefinitions += this.INDENT + this.getVariableName(classVars[i].getId()) + ' = None\n';
66-
}
61+
6762
if (this.context?.getHasMechanisms()){
6863
variableDefinitions += this.INDENT + "self.mechanisms = []\n";
6964
}

0 commit comments

Comments
 (0)