[http-client-python] Fix enum member names with hyphens generating invalid Python identifiers#10399
Open
[http-client-python] Fix enum member names with hyphens generating invalid Python identifiers#10399
Conversation
Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/7af9fbbf-509c-43ad-b46f-8453e38951c0 Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix enum name to avoid compile error in python emitter
[http-client-python] Fix enum member names with hyphens generating invalid Python identifiers
Apr 16, 2026
commit: |
Member
|
@copilot Change the enum name in tests to prevent cspell issue. |
…sues Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/1f7b72a6-6df2-4c1c-96b0-f021667e2e54 Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Contributor
Author
Collaborator
|
You can try these changes here
|
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.
EAP-TLS) which are invalid Python identifiersenumName()function inemitter/src/types.tsreturns name as-is when already uppercase, skipping hyphen-to-underscore conversionenumName()function to always usecamelToSnakeCasewhich handles non-word characters via splitcamelToSnakeCasetests