[python] remove reserved word padding for enum values#9898
Open
[python] remove reserved word padding for enum values#9898
Conversation
Enum values are generated in UPPER_CASE so there is no need for reserved word padding. This removes PadType.ENUM_VALUE and its associated logic, and fixes the failing test_escaped_reserved_words test. Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix CI failures in HTTP client tests
[python] remove reserved word padding for enum values
Mar 4, 2026
Collaborator
|
You can try these changes here
|
This was referenced Mar 4, 2026
tadelesh
approved these changes
Mar 4, 2026
msyyc
approved these changes
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enum values are generated in UPPER_CASE, so reserved word padding is unnecessary. Removes
PadType.ENUM_VALUEand its associated logic.python_mappings.py: RemoveENUM_VALUEvariant fromPadTypeenum and its entry inRESERVED_WORDSpreprocess/__init__.py: Dropupdate_enum_valueimport; replace padding logic with directstr.upper()(retainingENUM_prefix for digit-leading names)test_name_converter.py: RemoveENUM_VALUEtest cases that referenced the deleted variant (CI fix)🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.