Skip to content

Conversation

@lizlooney
Copy link
Collaborator

Handle method names that are python reserved words.
Fixes #73

Update mrc_call_python_function blocks in the same blockly workspace when the method name on a mrc_class_method_def block is changed.
(This does not close 71 because does not update callers if a parameter or the return type changes.

…thodName, and getClassMethodName methods from GeneratorContext.

Removed nameFieldValue parameter from ExtendedPythonGenerator.addClassMethodDefinition method.
In the validator, check whether the proposed method name collides with existing mrc_class_method_def blocks and update caller blocks.

Added maybeRenameProcedure function to mrc_call_python_function blocks.
@lizlooney lizlooney requested a review from alan412 March 5, 2025 04:18
Copy link
Collaborator

@alan412 alan412 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! Much cleaner than before and it works like a champ!!

@lizlooney lizlooney merged commit a78aa99 into wpilibsuite:main Mar 7, 2025
1 check passed
@lizlooney lizlooney deleted the pr_method_name_python_reserved_word_2 branch March 7, 2025 03:33
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.

Handle method names that are python reserved words

2 participants