-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Make error message explicit in legend.py #17488
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
Make error message explicit
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.
Please try to give your commits meaningful messages.
Co-authored-by: Elliott Sales de Andrade <[email protected]>
@ClementWalter Would you be willing to add a test for this? |
ok i will try to dit in the next few days |
Ping? |
This needs a rebase. Prob doesn't desperately need a test, thought it would be nice to up our code coverage. |
Hi!
Sorry I was doing completely other things I’ll fix this over the weekend promise
Thanks
Clément Walter
+336.29.44.21.67
… Le 27 janv. 2021 à 22:10, Jody Klymak ***@***.***> a écrit :
This needs a rebase. Prob doesn't desperately need a test, thought it would be nice to up our code coverage.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
cbook._warn_external('The label {!r} of handle {!r} cannot be ' | ||
'a string starting with ' | ||
'"_"'.format(label, handle)) |
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.
The merge conflict comes from internal changes cbook._warn_external
-> _api.warn_external
.
While you're at it, using f-strings makes this more readable.
cbook._warn_external('The label {!r} of handle {!r} cannot be ' | |
'a string starting with ' | |
'"_"'.format(label, handle)) | |
_api.warn_external(f'The label {label!r} of handle {handle!r} ' | |
'cannot be a string starting with "_"') |
Replaces and closes matplotlib#17488. Co-authored-by: Clement Walter <[email protected]>
Replaces and closes matplotlib#17488. Co-authored-by: Clement Walter <[email protected]>
Replaces and closes matplotlib#17488. Co-authored-by: Clement Walter <[email protected]>
PR Summary
Update the error message when label is a string and starts with
_
so as to make it clearer to the user.PR Checklist