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

Savefig does not issue a warning on a non-existent keyword n · Issue #192 · matplotlib/matplotlib · GitHub

Repository navigation

Savefig does not issue a warning on a non-existent keyword n #192

Closed

Description

Original report at SourceForge, opened Tue Feb 8 16:27:19 2011

savefig does not issue a warning on a non-existent keyword name

Example
Savefig('filename.png', NonExistant=True)
Will not throw any warning. This is especially important if you accidentally misspell an argument, such as:
Savefig('filename.png', tranperent=True)
Notice 'transperent' instead of 'transparent'

Activity

  1. pelson commented on Jun 18, 2012

    Member

    @ootz0rz: I've had a quick look at your attached commit. I think probably the best approach to resolving this issue would be to go through the backend_*.py files, looking for the cases where **kwargs have been accepted, but not used. For instance, if you remove the **kwargs in backends_agg.py's print_png function, then you might find that Python does the error handling for you for "pngs" at least.

    Do you fancy getting involved and seeing how you get on implementing a fix?

  2. ghost assigned on Jun 18, 2012
  3. modified the milestones: v1.4.x, on Aug 18, 2014
  4. modified the milestones: , on Feb 16, 2016
  5. tacaswell commented on Feb 16, 2016

    Member

    Started to look into this again, it is a rat's nest.

    print_figure throws the kitchen sink at the underlying print functions so if we want to lock this down we need to lock down the union of the keywords expected in all of the print functions.

  6. self-assigned this
    on Apr 22, 2020
  7. anntzer commented on Apr 22, 2020

    Contributor

    fwiw mplcairo simply lists the (extra) allowed kwargs in mplcairo.base._check_print_extra_kwargs, and throws if anything not in there is passed.

  8. QuLogic commented on Apr 22, 2020

    Member

    Unfortunately, there's some incomplete implementations of some keyword arguments in some backends that makes this a bit more difficult than it should be.

  9. added 2 commits that reference this issue on Apr 23, 2020
    0bd3491
    cb47539
  10. added 3 commits that reference this issue on Jun 10, 2020
    f74575c
    f25f1eb
    b7a574f
  11. modified the milestones: , v3.3.0 on Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL