Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
[MNT] Typing: Use Literal for set_loglevel#30301
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
`Added type hints for LogLevel, RcGroupType, and RcParamKeyType in matplotlib/typing.py``Updated type hints for set_loglevel, rc, and rcParams in matplotlib
…amKeyType``Remove tools/update_rcparam_typing.py script``Update matplotlib rc function to accept string group instead of RcGroupType``Remove unused imports and docstrings`
nrnavaneet commentedJul 12, 2025
Hi@timhoffm |
26c16fd tocf1a70cCompared6b7a49 to92b69f7Comparenrnavaneet commentedJul 12, 2025
Hi, I wanted to clarify an issue I’m currently facing. As part of the initial changes, I had created a temporary script tools/update_rcparam_typing.py to help with regenerating the RcParamKeyType block. I’ve since removed the file from the project, but it still appears in the PR history as both added and deleted, causing the CI check to fail. I’ve tried resolving it, but I haven’t been able to fix it successfully. I’d really appreciate any guidance on how to clean this up properly, should I rebase and drop that commit, or is there a preferred approach for this situation? Thanks so much for your patience and support! |
Uh oh!
There was an error while loading.Please reload this page.
This PR addresses part of#30257 by improving type safety and IDE support for set_loglevel.
Changes in this PR:
This improves discoverability and static type checking for valid logging levels like "info", "debug", "error", etc.
Related work not included here
MarkerType updates were implemented by@ZPyrolink in#30261
Event type literals for connect methods were contributed by@ZPyrolink in#30275