Show enum members in Annotated types like Literal does - #14654
Conversation
repr() was dumping things like <Color.red: 'red'> into the docs.
|
The red CI here isn't from this change — it's Pygments 2.21.0, which stopped escaping Six tests fail, all of them string-comparing highlighted HTML:
None of them touch Happy to send the escaping updates as a separate PR if that's useful, or rebase this one once that's sorted — just say which you'd prefer. |
No code change. The previous CI run predates recent master activity; re-trigger to see whether the Pygments HTML escaping failures are still present on tip.
|
Pushed an empty commit to re-run CI on current The earlier red jobs were highlighting tests that assert HTML containing |
Annotated[int, Color.red]was going throughrepr(), so autodoc printed<Color.red: 'red'>. Literal already formats enum members as:py:attr:links — reused that for Annotated metadata.Fixes #14653