Skip to content

Use repr in error message Addresses #21959#24403

Merged
QuLogic merged 6 commits intomatplotlib:mainfrom
jefromyers:repr-instead-of-str
Nov 10, 2022
Merged

Use repr in error message Addresses #21959#24403
QuLogic merged 6 commits intomatplotlib:mainfrom
jefromyers:repr-instead-of-str

Conversation

@jefromyers
Copy link
Copy Markdown
Contributor

Implements the proposed solution in issue #21959. Error message now outputs the user’s input via repr.

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [N/A] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [N/A] Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@story645 story645 linked an issue Nov 8, 2022 that may be closed by this pull request
@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Nov 10, 2022

Do you mind if I squash merge this PR, or would you like to?

@jefromyers
Copy link
Copy Markdown
Contributor Author

feel free to squash, sir. thanks for your help.

@QuLogic QuLogic added this to the v3.7.0 milestone Nov 10, 2022
@QuLogic QuLogic merged commit 04ce3e9 into matplotlib:main Nov 10, 2022
@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Nov 10, 2022

Thanks @jefromyers! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again.

@QuLogic QuLogic mentioned this pull request Nov 10, 2022
melissawm pushed a commit to melissawm/matplotlib that referenced this pull request Dec 19, 2022
* use repr in error message closes matplotlib#21959

* add test for repr error message

* fix formatting

* clean up formatting and naming

* add `pragma: no cover`

* remove import and function name a bit more explicit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[ENH]: Use repr instead of str in the error message

3 participants