Convert _math_style_dict into an Enum.#18555
Conversation
| SCRIPTSTYLE = enum.auto() | ||
| SCRIPTSCRIPTSTYLE = enum.auto() | ||
|
|
There was a problem hiding this comment.
Hmm, apparently nowhere. My guess is they were defined for compatibility with TeX, but never implemented. Looking at commit messages of #8151, I think that was the author's goal but maybe never got back to it.
|
So we are swapping a weird dict thing for a weird enum thing? 😉 Was there something that motivated this? |
|
Modernization, but then I didn't find any other things to convert to enum, so I figured I'd open the PR before it became unmergeable (which is already did once). But this does mean no typos, because it can be linted, and works with typing, if we ever get around to that. |
|
I guess |
|
I mean, I dont' really mind, I just don't see why this is particularly better for something that isn't broken |
PR Summary
Instead of a weird
dictthing.PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsandpydocstyle<4and runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).