microsoft / microsoft/typespec

[python] Enum member names drop underscores before date segments

Open
#10,312 0 comments 0 reactions 1 assignee Claimed by @iscai-msft View on GitHub
emitter:client:python
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

- `WEB_SEARCH_PREVIEW_2025_03_11` is emitted as WEB_SEARCH_PREVIEW2025_03_11 (underscore before the date dropped)
- `DEFAULT_2024_11_15` is emitted as DEFAULT2024_11_15 (same issue)

Similarly `A2A` enum member gets mangled to `A2_A`
In `AgentEndpointProtocol`, the value `A2A `is being emitted as `A2_A`. The emitter is incorrectly inserting an underscore, probably from a regex that tries to split on transitions between letters and digits.

Part of issues @dargilco is dealing with in his post processing script.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.