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 369c3c3

Browse filesBrowse files
authored
Merge pull request #13929 from anntzer/rcdeprecated
Better handle deprecated rcParams.
2 parents 44d503e + 214dbca commit 369c3c3
Copy full SHA for 369c3c3

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+4
-3
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,9 @@ def __getitem__(self, key):
824824
def __repr__(self):
825825
class_name = self.__class__.__name__
826826
indent = len(class_name) + 1
827-
repr_split = pprint.pformat(dict(self), indent=1,
828-
width=80 - indent).split('\n')
827+
with cbook._suppress_matplotlib_deprecation_warning():
828+
repr_split = pprint.pformat(dict(self), indent=1,
829+
width=80 - indent).split('\n')
829830
repr_indented = ('\n' + ' ' * indent).join(repr_split)
830831
return '{}({})'.format(class_name, repr_indented)
831832

‎lib/matplotlib/tests/test_style.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_style.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def test_alias(equiv_styles):
145145
rc_dicts = []
146146
for sty in equiv_styles:
147147
with style.context(sty):
148-
rc_dicts.append(dict(mpl.rcParams))
148+
rc_dicts.append(mpl.rcParams.copy())
149149

150150
rc_base = rc_dicts[0]
151151
for nm, rc in zip(equiv_styles[1:], rc_dicts[1:]):

0 commit comments

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