Skip to content

Conversation

@blauwefant
Copy link
Contributor

@blauwefant blauwefant commented Jun 22, 2025

  • Added support for classes, class instances, methods and instance attributes with a configuration format to define them. Each library in the configuration can be displayed in the toolbox.
  • Imports and variables (names and types) are now tracked to support showing more information in the blocks.
  • Added (configurable) display of default parameters in call blocks as shadowed blocks (disabled by default for now).
  • Introduced preferFullAttributeBlocks configuration setting.
  • Switched from python.pythonGenerator.ORDER_* to using the newer python.Order.*
  • Improved usage of parentheses by dynamically setting precedence order for attributes and calls.
  • Extracted library metadata into separate JSON files.
  • Upgraded Blockly to 12.3.1
  • Initial support for a translation hooks (initially for libraries only)
  • Simplified blocks for negative numbers. (No separate block for the minus sign unless needed.)
  • Fixed incorrect augmented assignment in non-simple cases.

Verified by manual testing and the already present (semi)automated tests.

I did remove the existing mechanisms to register modules and functions, as they overlapped with the new mechanism, which should also do everything the old one did.

There are some TODOs still in the code, as some more advanced features are not yet implemented fully, such as (block) support for *args and **kwargs. There should already be feature parity with the previous behavior though.

I hope the library configurations are clear and these changes fit with the direction of this project.

Best regards!

…ration format to define them. Each library in the configuration can be displayed in the toolbox.

Imports and variables (names and types) are now tracked to support showing more information in the blocks
Added display of default parameters in call blocks as shadowed blocks.
Introduced preferFullAttributeBlocks configuration setting.
Switched from python.pythonGenerator.ORDER_* to using the newer python.Order.*
Improved usage of parentheses by dynamically setting precedence order for attributes and calls.
Minor fix for newlines after imports
…ase scrubbing provides additional functionality
Separated out some library documentation into its own readme file.
Upgraded Blockly to 12.2.0
Improvement of import handling
Various smaller bug fixes and cleanups
Improvement of import handling
Various smaller bug fixes and cleanups
Implement argument shadowing of tuples
@blauwefant
Copy link
Contributor Author

I am doing a lot of testing and refining, as more complexities pop up when testing with more extensive Python libraries. So more fixes and improvements are likely to come in.

Make showing default function arguments as shadowed blocks configurable (showDefaultArguments) and set it to false by default (to revert to the previous behavior).
Make scroll behavior configurable.
Initial translation support (only for libraries for now).
Add more variable type registrations.
Various cleanups and fixes.
Add zoom option to configuration.
Clean up resolving a type hint into a single class.
Fixed incorrect augmented assignment in non-simple cases.
…ing a function.

Better support for full rgb colours.
Fix variable creation to use custom blocks.
Added some more library functions.
Some bigger cleanups.
Synchronized attribute and call implementations.
More translation hook implementation.
Various library definition improvements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant