-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Style fixes. #15086
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
Style fixes. #15086
Conversation
All the more reason to work to make sure we actually run 100% of our test code. 99.09% != 100% (though I guess it will go up with this PR.) |
8b34965
to
0006a62
Compare
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.
Everything else looks fine, just a couple small quibbles.
lib/matplotlib/_layoutbox.py
Outdated
layout. | ||
''' | ||
""" | ||
Make all elements in this tree none, signalling not to do any more layout. |
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.
Is it one 'l' or two for "signalling"? Both form look misspelled to me.
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.
Also, this none
here should probably be rendered as a literal None?
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.
MW says both are fine: https://www.merriam-webster.com/dictionary/signalling?utm_campaign=sd&utm_medium=serp&utm_source=jsonld
Edited none -> None.
"{0} instead of {1}.".format(x.shape, z.shape)) | ||
|
||
raise TypeError( | ||
f"Shapes of x {x.shape} and z {z.shape} do not match") |
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.
"Shapes of x (2, 3) and z (2, 4) do not match" would look a bit odd.
I would go for Shapes of x and z do match: {x.shape} != {z.shape}
.
Similarly in some other places.
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.
Actually I think my formulation reads better than yours, but I'm happy to hear suggestions from others.
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 think either is OK and tie goes to the incumbent.
... mostly found by pylint. It did catch two tests in test_colorbar with the same name, one shadowing the other...
... mostly found by pylint, plus some other stuff.
It did catch two tests in test_colorbar with the same name, one
shadowing the other :)
edit: also needed to update the tests that checked the exact error messages, so parametrized them at the same time.
PR Summary
PR Checklist