Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@QuLogic
Copy link
Member

@QuLogic QuLogic commented Aug 3, 2023

PR summary

There are 3 changes here:

  • When iterables were added to Table.auto_set_column_width in bug fix related #5479 #6047, the test added a string. Typing correctly points out that that is not accepted, and in fact it does not do anything (as shown in the test image) because column keys are ints, not strings, so the automatic width calculation is applied to nothing. So deprecate accepting random types here.
  • Fonts.used_characters was removed in Cleanup _mathtext internal API #22204, but Fonts.get_used_characters (which just returns that attribute) was not. This is private and can be removed directly, AFAICT.
  • The find_tex_file monkey patch in the test returned the wrong type, which doesn't technically break anything, but was confusing when comparing with the type stubs.

PR checklist

@QuLogic QuLogic added this to the v3.8.0 milestone Aug 3, 2023
QuLogic added 3 commits August 3, 2023 16:43
When iterables were added in matplotlib#6047, the test added a string. Typing
correctly points out that that is not accepted, and in fact it does not
do anything (as shown in the test image) because column keys are ints,
not strings.
This is never called, is on an internal class, and the attribute it
accesses doesn't exist as it was removed in matplotlib#22204.
The normal function returns a `str`, so this patch returning bytes is
confusing.
`LogFormatterSciNotation.sublabel` is not an attribute that exists.
There is the private `LogFormatterSciNotation._sublabels`, but this
obviously doesn't need to be set as the test is already passing.
@QuLogic
Copy link
Member Author

QuLogic commented Aug 3, 2023

Found one more thing: LogFormatterSciNotation.sublabel does not exist, so it did not have any effect in the test that set it. I've removed the line.

@tacaswell tacaswell merged commit aa3e00d into matplotlib:main Aug 3, 2023
@QuLogic QuLogic deleted the type-bugs branch August 3, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants