8000 Do not warn-depreacted when iterating over rcParams by timhoffm · Pull Request #12658 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Do not warn-depreacted when iterating over rcParams #12658

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 1 commit into from
Oct 29, 2018
Merged
Changes from all commits
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
7 changes: 4 additions & 3 deletions lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,9 @@ def __str__(self):

def __iter__(self):
"""Yield sorted list of keys."""
yield from sorted(dict.__iter__(self))
with warnings.catch_warnings():
warnings.simplefilter('ignore', MatplotlibDeprecationWarning)
yield from sorted(dict.__iter__(self))

def __len__(self):
return dict.__len__(self)
Expand All @@ -907,8 +909,7 @@ def find_all(self, pattern):
if pattern_re.search(key))

def copy(self):
return {k: dict.__getitem__(self, k)
for k in self}
return {k: dict.__getitem__(self, k) for k in self}


def rc_params(fail_on_error=False):
Expand Down
0