Skip to content

[python] remove reserved word padding for enum values#9898

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-ci-failures-http-client
Open

[python] remove reserved word padding for enum values#9898
Copilot wants to merge 2 commits intomainfrom
copilot/fix-ci-failures-http-client

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Enum values are generated in UPPER_CASE, so reserved word padding is unnecessary. Removes PadType.ENUM_VALUE and its associated logic.

  • python_mappings.py: Remove ENUM_VALUE variant from PadType enum and its entry in RESERVED_WORDS
  • preprocess/__init__.py: Drop update_enum_value import; replace padding logic with direct str.upper() (retaining ENUM_ prefix for digit-leading names)
  • test_name_converter.py: Remove ENUM_VALUE test 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.

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>
@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Mar 4, 2026
Copilot AI changed the title [WIP] Fix CI failures in HTTP client tests [python] remove reserved word padding for enum values Mar 4, 2026
Copilot finished work on behalf of msyyc March 4, 2026 05:37
@msyyc msyyc marked this pull request as ready for review March 4, 2026 06:10
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@msyyc msyyc enabled auto-merge March 4, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants