You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'python_name' key for enum values pulls double duty in metadata_add_all._add_enum_value_python_name(). It's intended that a user can set it to override the expanded name with the name that they want to be used in the API. In such a case, the user-set value should not be modified. But the helper method also uses the same key for the expansion process when it's not set by the user and does not track whether the user set it. As a result, common prefixes or suffixes may get removed from the user-set 'python_name', instead of using it, as is, to override the expanded name.
The text was updated successfully, but these errors were encountered:
ni-jfitzger
changed the title
metadata_add_all._add_enum_value_python_name() removes common suffixes from a user-set 'python_name'.
metadata_add_all._add_enum_value_python_name() removes common prefixes, suffixes from a user-set 'python_name'.
Jan 8, 2025
Description of issue
The 'python_name' key for enum values pulls double duty in
metadata_add_all._add_enum_value_python_name()
. It's intended that a user can set it to override the expanded name with the name that they want to be used in the API. In such a case, the user-set value should not be modified. But the helper method also uses the same key for the expansion process when it's not set by the user and does not track whether the user set it. As a result, common prefixes or suffixes may get removed from the user-set 'python_name', instead of using it, as is, to override the expanded name.The text was updated successfully, but these errors were encountered: