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 af9a17b

Browse filesBrowse files
authored
Merge pull request #12663 from meeseeksmachine/auto-backport-of-pr-12658-on-v3.0.x
Backport PR #12658 on branch v3.0.x (Do not warn-depreacted when iterating over rcParams)
2 parents 0593c59 + 46f1995 commit af9a17b
Copy full SHA for af9a17b

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
@@ -906,7 +906,9 @@ def __str__(self):
906906

907907
def __iter__(self):
908908
"""Yield sorted list of keys."""
909-
yield from sorted(dict.__iter__(self))
909+
with warnings.catch_warnings():
910+
warnings.simplefilter('ignore', MatplotlibDeprecationWarning)
911+
yield from sorted(dict.__iter__(self))
910912

911913
def __len__(self):
912914
return dict.__len__(self)
@@ -928,8 +930,7 @@ def find_all(self, pattern):
928930
if pattern_re.search(key))
929931

930932
def copy(self):
931-
return {k: dict.__getitem__(self, k)
932-
for k in self}
933+
return {k: dict.__getitem__(self, k) for k in self}
933934

934935

935936
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.