-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Convert _math_style_dict into an Enum. #18555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SCRIPTSTYLE = enum.auto() | ||
SCRIPTSCRIPTSTYLE = enum.auto() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these two used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
dict
thing.PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
andpydocstyle<4
and 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).