Skip to content

Conversation

lizlooney
Copy link
Collaborator

Added python tool that generates json

Added support for built-in methods (like print) to mrc_call_python_function.
Use mrc_call_python_function for the print block.

@lizlooney lizlooney requested a review from alan412 July 13, 2025 07:44
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 think items.ts needs to have contents as not optional in the Category class. If contents aren't passed in, then the contents array should be set to [] instead of being allowed to be undefined. While that isn't part of this PR, this PR causes a typescript error in the test_category file.

That can either be part of this PR, or I can do it in a general cleanup PR that I am planning.

I did find one minor problem, but it doesn't keep me from approving.

export function getCategory(): toolboxItems.Category {
const contents: toolboxItems.ContentsType[] = [];

const printFunction: FunctionData = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

FunctionData needs to be imported

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@lizlooney
Copy link
Collaborator Author

items.ts needs to have contents as not optional in the Category class.

Done

@lizlooney lizlooney merged commit ef1ee2c into wpilibsuite:main Jul 13, 2025
1 check passed
@lizlooney lizlooney deleted the pr_add_python_tools branch July 13, 2025 19:55
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.

2 participants