Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c921e2e

Browse filesBrowse files
authored
Merge pull request #12658 from timhoffm/iter-deprecated-rcparams
Do not warn-depreacted when iterating over rcParams
2 parents 6af7450 + 2dd6fae commit c921e2e
Copy full SHA for c921e2e

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,9 @@ def __str__(self):
885885

886886
def __iter__(self):
887887
"""Yield sorted list of keys."""
888-
yield from sorted(dict.__iter__(self))
888+
with warnings.catch_warnings():
889+
warnings.simplefilter('ignore', MatplotlibDeprecationWarning)
890+
yield from sorted(dict.__iter__(self))
889891

890892
def __len__(self):
891893
return dict.__len__(self)
@@ -907,8 +909,7 @@ def find_all(self, pattern):
907909
if pattern_re.search(key))
908910

909911
def copy(self):
910-
return {k: dict.__getitem__(self, k)
911-
for k in self}
912+
return {k: dict.__getitem__(self, k) for k in self}
912913

913914

914915
def rc_params(fail_on_error=False):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.