Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Create RCKeyType#30316
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
Create RCKeyType#30316
Uh oh!
There was an error while loading.Please reload this page.
Conversation
rcomer commentedSep 7, 2025
Hi@ZPyrolink do you need some help getting this PR ready for review? |
# Conflicts:#lib/matplotlib/typing.py
ZPyrolink commentedSep 7, 2025
Hi, sorry, I was taking a break and forgot to push my last commit and set the PR as ready for review. I only had one problem with mypy corrected with a use of RcKeyType and # type: ignore[index] (I don't know if there is another solution for this one). |
| super().__init__(default_font_prop,load_glyph_flags) | ||
| fortexfontin"cal rm tt it bf sf bfit".split(): | ||
| prop=mpl.rcParams['mathtext.'+texfont] | ||
| prop=mpl.rcParams['mathtext.'+texfont]# type: ignore[index] |
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.
There is no getter for a group so I think ignoring the error is the only solution.
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.
I assume mypy is complaining here. Would it help to make the list explicit?
fortexfontin ["cal","rm","tt","it","bf","sf","bfit"]:
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.
Unfortunately mypy considertextfont as astr and the sum also as str so we have the same error
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.
Ok in that case, ignoring is likely the simplest solution.
| super().__init__(default_font_prop,load_glyph_flags) | ||
| fortexfontin"cal rm tt it bf sf bfit".split(): | ||
| prop=mpl.rcParams['mathtext.'+texfont] | ||
| prop=mpl.rcParams['mathtext.'+texfont]# type: ignore[index] |
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.
Ok in that case, ignoring is likely the simplest solution.
QuLogic commentedOct 30, 2025
This is a bit outdated, but I'm going to merge and open a followup PR. |
cd3685f intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
PR summary
This PR create types for the RC (Runtime Configuration)
RcKeyTypeRcGroupTypeThese types are used on:
RcParams.__setitem__RcParams.__getitem__matplotlib.rcPR checklist