You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unraw complex struct enum field python names (#5050)
* Unraw complex struct enum field python names
Stray case related to #2395 (probably unnoticed because the functionality is
newer and a bit of an edge case).
The `python_name` of struct-type enum variant fields (and the `__match_args__`
of the variant) do not unraw the names of these fields, which effectively
makes them unusable as the resulting identifiers contain '#' which the Python
lexer interprets as comments. The only reason you'd probably want to do this
anyway is to use reserved identifiers (`type` in my case).
* Add newsfragment for fix
* Fix clippy lints in impl_complex_enum_variant_match_args and callers
No need to pass mutable vec ref anymore
* don't overeagerly collect field_names iterator
* add test case for complex enums containing raw identifiers
* only test raw ident pattern matching on Python 3.10+
0 commit comments