Skip to content

Warn about unused kwargs in contour methods #7728

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

Merged
merged 3 commits into from
Aug 14, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Simplify warning message generation
  • Loading branch information
dstansby committed Aug 10, 2017
commit 4481344d493740e0892e82ff1e26c0ad2d66ceb9
4 changes: 1 addition & 3 deletions lib/matplotlib/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,7 @@ def __init__(self, ax, *args, **kwargs):
self.changed() # set the colors

if kwargs:
s = ''
for key, value in kwargs.items():
s += '"' + str(key) + '"' + ', '
s = ", ".join(map(repr, kwargs))
warnings.warn('The following kwargs were not used by contour: ' +
s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could just be ", ".join(map(repr, kwargs)).


Expand Down