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 0a66aee

Browse filesBrowse files
committed
String formatting in matplotlib directory changed
1 parent 56d71a7 commit 0a66aee
Copy full SHA for 0a66aee

File tree

Expand file treeCollapse file tree

9 files changed

+12
-11
lines changed
Filter options
Expand file treeCollapse file tree

9 files changed

+12
-11
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def set_fileo(self, fname):
281281
try:
282282
fileo = open(fname, 'w')
283283
except IOError:
284-
raise ValueError('Verbose object could not open log file "{}"'
284+
raise ValueError('Verbose object could not open log file "{0}"'
285285
' for writing.\nCheck your matplotlibrc '
286286
'verbose.fileo setting'.format(fname))
287287
else:

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
693693
"'savefig_kwargs' as it is only currently supported "
694694
"with the writers 'ffmpeg_file' and 'mencoder_file' "
695695
"(writer used: "
696-
"'{}').".format(
696+
"'{0}').".format(
697697
writer if isinstance(writer, six.string_types)
698698
else writer.__class__.__name__))
699699
savefig_kwargs.pop('bbox_inches')

‎lib/matplotlib/backends/backend_nbagg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_nbagg.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ def connection_info():
7474
result = []
7575
for manager in Gcf.get_all_fig_managers():
7676
fig = manager.canvas.figure
77-
result.append('{} - {}'.format((fig.get_label() or
77+
result.append('{0} - {0}'.format((fig.get_label() or
7878
"Figure {0}".format(manager.num)),
7979
manager.web_sockets))
80-
result.append('Figures pending show: {}'.format(len(Gcf._activeQue)))
80+
result.append('Figures pending show: {0}'.format(len(Gcf._activeQue)))
8181
return '\n'.join(result)
8282

8383

‎lib/matplotlib/backends/backend_webagg_core.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_webagg_core.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,10 @@ def handle_event(self, event):
329329
self._force_full = True
330330
self.draw_idle()
331331
else:
332-
handler = getattr(self, 'handle_{}'.format(e_type), None)
332+
handler = getattr(self, 'handle_{0}'.format(e_type), None)
333333
if handler is None:
334334
import warnings
335-
warnings.warn('Unhandled message type {}. {}'.format(
335+
warnings.warn('Unhandled message type {0}. {1}'.format(
336336
e_type, event))
337337
else:
338338
return handler(event)

‎lib/matplotlib/colors.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colors.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ def shade_rgb(self, rgb, elevation, fraction=1., blend_mode='hsv',
17091709
try:
17101710
blend = blend_mode(rgb, intensity, **kwargs)
17111711
except TypeError:
1712-
msg = '"blend_mode" must be callable or one of {}'
1712+
msg = '"blend_mode" must be callable or one of {0}'
17131713
raise ValueError(msg.format(lookup.keys))
17141714

17151715
# Only apply result where hillshade intensity isn't masked

‎lib/matplotlib/markers.py

Copy file name to clipboardExpand all lines: lib/matplotlib/markers.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ def set_marker(self, marker):
244244
Path(marker)
245245
self._marker_function = self._set_vertices
246246
except ValueError:
247-
raise ValueError('Unrecognized marker style {}'.format(marker))
247+
raise ValueError('Unrecognized marker style'
248+
' {0}'.format(marker))
248249

249250
self._marker = marker
250251
self._recache()

‎lib/matplotlib/mlab.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mlab.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2553,7 +2553,7 @@ def key_desc(name):
25532553

25542554
dt2 = r2.dtype[name]
25552555
if dt1 != dt2:
2556-
msg = "The '{}' fields in arrays 'r1' and 'r2' must have the same"
2556+
msg = "The '{0}' fields in arrays 'r1' and 'r2' must have the same"
25572557
msg += " dtype."
25582558
raise ValueError(msg.format(name))
25592559
if dt1.num > dt2.num:

‎lib/matplotlib/patheffects.py

Copy file name to clipboardExpand all lines: lib/matplotlib/patheffects.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _update_gc(self, gc, new_gc_dict):
5656
for k, v in six.iteritems(new_gc_dict):
5757
set_method = getattr(gc, 'set_' + k, None)
5858
if set_method is None or not six.callable(set_method):
59-
raise AttributeError('Unknown property {}'.format(k))
59+
raise AttributeError('Unknown property {0}'.format(k))
6060
set_method(v)
6161
return gc
6262

‎lib/matplotlib/tri/tripcolor.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tri/tripcolor.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def tripcolor(ax, *args, **kwargs):
6666

6767
if shading not in ['flat', 'gouraud']:
6868
raise ValueError("shading must be one of ['flat', 'gouraud'] "
69-
"not {}".format(shading))
69+
"not {0}".format(shading))
7070

7171
tri, args, kwargs = Triangulation.get_from_args_and_kwargs(*args, **kwargs)
7272

0 commit comments

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