Handle method names that are python reserved words.#84
Closed
lizlooney wants to merge 1 commit intowpilibsuite:mainfrom
Closed
Handle method names that are python reserved words.#84lizlooney wants to merge 1 commit intowpilibsuite:mainfrom
lizlooney wants to merge 1 commit intowpilibsuite:mainfrom
Conversation
Added known issue to readme: renaming a method definition doesn't update call blocks.
alan412
reviewed
Mar 1, 2025
Collaborator
alan412
left a comment
There was a problem hiding this comment.
This doesn't seem like the right way to solve this problem. It feels like it should all be done in mrc_class_method_def using .mrcPythonMethodName. That way the same code we will need for when a user renames a method can be used for when they put in a reserved word
Collaborator
|
Although i did test it and it does work. |
Collaborator
Author
Collaborator
Author
|
I made some more progress on this by looking at how blockly does their procedure blocks. |
Collaborator
Author
|
I'm closing this PR. I'll make a new one with a better implementation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The code generated for blocks that call methods defined in the same module match the method definition blocks. For example, if you create a method named "raise" and you drop a call block for it on the same blockly workspace, the python code for both the definition and the call will be "raise2".
Added known issue to readme: renaming a method definition doesn't update call blocks.
Fixes #73