Skip to content

Commit 4953b11

Browse files
committed
Added calling the super class for update
1 parent e8949a6 commit 4953b11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/blocks/mrc_class_method_def.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ export const pythonFromBlock = function (
356356
branch = generator.INDENT + 'super().__init__(' + class_specific + ')\n' +
357357
generator.defineClassVariables() + branch;
358358
}
359+
else if (funcName == 'update'){
360+
// Special case for update, to also call the update method of the base class
361+
branch = generator.INDENT + 'self.update()\n' + branch;
362+
}
359363
if (returnValue) {
360364
returnValue = generator.INDENT + 'return ' + returnValue + '\n';
361365
} else if (!branch) {

0 commit comments

Comments
 (0)