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 7e2bffb

Browse filesBrowse files
committed
Use iteritems from six module
1 parent 0b098e2 commit 7e2bffb
Copy full SHA for 7e2bffb

File tree

Expand file treeCollapse file tree

2 files changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-2
lines changed

‎lib/matplotlib/style/core.py

Copy file name to clipboardExpand all lines: lib/matplotlib/style/core.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def update_nested_dict(main_dict, new_dict):
137137
already exists. Instead you should update the sub-dict.
138138
"""
139139
# update named styles specified by user
140-
for name, rc_dict in new_dict.iteritems():
140+
for name, rc_dict in six.iteritems(new_dict):
141141
if name in main_dict:
142142
main_dict[name].update(rc_dict)
143143
else:

‎lib/matplotlib/tests/test_style.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_style.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
from __future__ import (absolute_import, division, print_function,
2+
unicode_literals)
3+
14
import os
25
import shutil
36
import tempfile
@@ -7,6 +10,8 @@
710
from matplotlib import style
811
from matplotlib.style.core import USER_LIBRARY_PATHS, STYLE_EXTENSION
912

13+
import six
14+
1015

1116
PARAM = 'image.cmap'
1217
VALUE = 'pink'
@@ -22,7 +27,7 @@ def temp_style(style_name, settings=None):
2227
# Write style settings to file in the temp directory.
2328
tempdir = tempfile.mkdtemp()
2429
with open(os.path.join(tempdir, temp_file), 'w') as f:
25-
for k, v in settings.iteritems():
30+
for k, v in six.iteritems(settings):
2631
f.write('%s: %s' % (k, v))
2732

2833
# Add temp directory to style path and reload so we can access this style.

0 commit comments

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