FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Harmonize exceptions for unknown keyword arguments. by anntzer · Pull Request #24889 · matplotlib/matplotlib · GitHub

Repository navigation

Harmonize exceptions for unknown keyword arguments. - #24889

Merged
QuLogic merged 1 commit into
matplotlib:mainfrom
anntzer:ke
Jan 7, 2023
Merged

QuLogic merged 1 commit into
matplotlib:mainfrom
anntzer:ke

Conversation

anntzer commented Jan 5, 2023

Copy link
Copy Markdown
Contributor

... via a kwarg_error helper (see nargs_error for a similar design). In particular the type of the exception thrown by AxesImage.set_extent changed, and parentheses were added to the error thrown by _process_plot_var_args.

PR Summary

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

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

Copy link
Copy Markdown
Member

In cases where we have several too many can we still list them all (or the first N>1)?

anntzer commented Jan 5, 2023

Copy link
Copy Markdown
Contributor Author

FWIW python itself doesn't do so, e.g.

>>> def f(x): pass
... 
>>> f(y=1, z=2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: f() got an unexpected keyword argument 'y'

If you feel strongly about it I can still print all of them, but I tend to prefer consistency with python here.

anntzer force-pushed the ke branch 2 times, most recently from be68641 to 0272560 Compare January 5, 2023 22:31
Comment thread lib/matplotlib/image.py Outdated
... via a kwarg_error helper (see nargs_error for a similar design).  In
particular the type of the exception thrown by AxesImage.set_extent
changed, and parentheses were added to the error thrown by
_process_plot_var_args.
QuLogic merged commit d12ea34 into matplotlib:main Jan 7, 2023
anntzer deleted the ke branch January 7, 2023 09:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL