nimi-python icon indicating copy to clipboard operation
nimi-python copied to clipboard

Fix _add_enum_value_python_name() to respect explicitly set value names

Open ni-jfitzger opened this issue 1 year ago • 1 comments

  • [X] This contribution adheres to CONTRIBUTING.md.
  • ~[ ] I've updated CHANGELOG.md if applicable.~
  • [X] I've added tests applicable for this pull request

What does this Pull Request accomplish?

The python_name metadata key is supposed to allow us to explicitly set the name that will be used by the Python API. For enum values, this was not being respected.

This change fixes that and adds additional unit test coverage for enum value expansion.

As part of this, we have to temporarily override some enum value metadata. Followup item: #2072

List issues fixed by this Pull Request below, if any.

  • Fix #2066

What testing has been done?

  • Unit tests pass
  • Codegen has run and API is unchanged
  • PR Checks

ni-jfitzger avatar Jan 26 '25 18:01 ni-jfitzger