metadata_add_all._add_enum_value_python_name() removes common prefixes, suffixes from a user-set 'python_name'.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Locate metadata_add_all._add_enum_value_python_name() and trace how enum values receive their python_name. Verify that user-set values remain unchanged while automatically expanded names may have common prefixes or suffixes removed; confirm the behavior with the relevant existing tests, if present.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 128
- Forks
- 110
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ni/nimi-python
-
docs nitclk priority-low
Difficulty 1/5 Under an hour Newbie friendliness 68/100
ni/nimi-python#1993 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ni/nimi-python#2164 · 1 comment ·
-
bug docs
Difficulty 1/5 Under an hour Newbie friendliness 48/100
ni/nimi-python#2162 ·
-
codegen enhancement
Difficulty 4/5 3-5 days Newbie friendliness 42/100
ni/nimi-python#2148 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ni/nimi-python#2122 ·
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100