@@ -26,17 +26,17 @@ import * as MechanismContainerHolder from '../blocks/mrc_mechanism_component_hol
2626
2727export class OpModeDetails {
2828 constructor ( private name : string , private group : string , private enabled : boolean , private type : string ) { }
29- annotations ( ) : string {
29+ annotations ( className : string ) : string {
3030 let code = '' ;
3131
3232 if ( this . enabled ) {
3333 code += '@' + this . type + "\n" ;
3434
3535 if ( this . name ) {
36- code += '@name( "' + this . name + '")\n' ;
36+ code += '@Name(' + className + ', "' + this . name + '")\n' ;
3737 }
3838 if ( this . group ) {
39- code += '@group( "' + this . group + '")\n' ;
39+ code += '@Group(' + className + ', "' + this . group + '")\n' ;
4040 }
4141 }
4242 return code ;
@@ -46,10 +46,10 @@ export class OpModeDetails {
4646 if ( this . enabled ) {
4747 code += 'from blocks_base_classes import ' + this . type + '\n' ;
4848 if ( this . name ) {
49- code += 'from blocks_base_classes import name \n' ;
49+ code += 'from blocks_base_classes import Name \n' ;
5050 }
5151 if ( this . group ) {
52- code += 'from blocks_base_classes import group \n' ;
52+ code += 'from blocks_base_classes import Group \n' ;
5353 }
5454 }
5555
@@ -195,7 +195,7 @@ export class ExtendedPythonGenerator extends PythonGenerator {
195195 if ( this . context && this . workspace ) {
196196 const className = this . context . getClassName ( ) ;
197197 const classParent = this . context . getClassParent ( ) ;
198- const annotations = this . details ?. annotations ( ) ;
198+ const annotations = this . details ?. annotations ( className ) ;
199199 const import_annotations = this . details ?. imports ( ) ;
200200
201201 if ( import_annotations ) {
0 commit comments