fix(generators): Improve consistency of migrated language generators (#7662)

* docs(generators): @fileoverview -> @file; delete @suppress

* fix(generators): Fix return type of getAdjusted

  And improve its documentation too.

  Fix the @returns doc for PythonGenerator's getAdjustedInt but
  (for now) don't change the type because it does actually
  return numbers in some circumstances.
This commit is contained in:
Christopher Allen
2023-11-28 16:57:31 +00:00
committed by GitHub
parent ac362fd57a
commit b198e2f4ae
33 changed files with 41 additions and 43 deletions

View File

@@ -5,7 +5,7 @@
*/
/**
* @fileoverview Generating Python for colour blocks.
* @file Generating Python for colour blocks.
*/
// Former goog.module ID: Blockly.Python.colour

View File

@@ -5,7 +5,7 @@
*/
/**
* @fileoverview Generating Python for list blocks.
* @file Generating Python for list blocks.
*/
// Former goog.module ID: Blockly.Python.lists

View File

@@ -5,7 +5,7 @@
*/
/**
* @fileoverview Generating Python for logic blocks.
* @file Generating Python for logic blocks.
*/
// Former goog.module ID: Blockly.Python.logic

View File

@@ -5,7 +5,7 @@
*/
/**
* @fileoverview Generating Python for loop blocks.
* @file Generating Python for loop blocks.
*/
// Former goog.module ID: Blockly.Python.loops

View File

@@ -5,7 +5,7 @@
*/
/**
* @fileoverview Generating Python for math blocks.
* @file Generating Python for math blocks.
*/
// Former goog.module ID: Blockly.Python.math

View File

@@ -5,7 +5,7 @@
*/
/**
* @fileoverview Generating Python for procedure blocks.
* @file Generating Python for procedure blocks.
*/
// Former goog.module ID: Blockly.Python.procedures

View File

@@ -318,7 +318,7 @@ export class PythonGenerator extends CodeGenerator {
* @param atId The ID of the input block to get (and adjust) the value of.
* @param delta Value to add.
* @param negate Whether to negate the value.
* @returns The adjusted value.
* @returns The adjusted value or code that evaluates to it.
*/
getAdjustedInt(
block: Block,

View File

@@ -5,7 +5,7 @@
*/
/**
* @fileoverview Generating Python for text blocks.
* @file Generating Python for text blocks.
*/
// Former goog.module ID: Blockly.Python.texts

View File

@@ -5,7 +5,7 @@
*/
/**
* @fileoverview Generating Python for variable blocks.
* @file Generating Python for variable blocks.
*/
// Former goog.module ID: Blockly.Python.variables

View File

@@ -5,7 +5,7 @@
*/
/**
* @fileoverview Generating Python for dynamic variable blocks.
* @file Generating Python for dynamic variable blocks.
*/
// Former goog.module ID: Blockly.Python.variablesDynamic