diff --git a/src/blocks/utils/variable.ts b/src/blocks/utils/variable.ts index 0c8ffaea..4c1d874e 100644 --- a/src/blocks/utils/variable.ts +++ b/src/blocks/utils/variable.ts @@ -61,7 +61,10 @@ export function varNameForType(type: string): string { if (alias) { type = alias; } - + + // TODO(lizlooney): Should the prefix "my" in myTuple, myDict, myCallable, myArray, and my be localized? + // TODO(lizlooney): Should variable names be lowerPascalCase or snake_case? + if (type.startsWith('tuple[') || type.startsWith('Tuple[')) { return 'myTuple'; } @@ -76,8 +79,7 @@ export function varNameForType(type: string): string { } if (type.includes('[')) { // The type is an array. - // TODO(lizlooney): What's a good name for an array variable? - return ''; + return 'myArray'; } // If the type has a dot, it is an object and we should provide a variable // block for this type.