Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4688a3d

Browse files
committed
Merge pull request #5935 from WeatherGod/fix_formatting
Fixed instances of {} formating for py2.6 compatibility.
2 parents cb4e69f + 125a362 commit 4688a3d

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

examples/pylab_examples/barchart_demo2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def format_score(scr, test):
5050
"""
5151
md = testMeta[test]
5252
if md:
53-
return '{}\n{}'.format(scr, md)
53+
return '{0}\n{1}'.format(scr, md)
5454
else:
5555
return scr
5656

@@ -86,7 +86,7 @@ def plot_student_results(student, scores, cohort_size):
8686
# Plot a solid vertical gridline to highlight the median position
8787
ax1.axvline(50, color='grey', alpha=0.25)
8888
# set X-axis tick marks at the deciles
89-
cohort_label = ax1.text(.5, -.07, 'Cohort Size: {}'.format(cohort_size),
89+
cohort_label = ax1.text(.5, -.07, 'Cohort Size: {0}'.format(cohort_size),
9090
horizontalalignment='center', size='small',
9191
transform=ax1.transAxes)
9292

lib/matplotlib/artist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,5 +1482,5 @@ def kwdoc(a):
14821482

14831483
docstring.interpd.update(Artist=kwdoc(Artist))
14841484

1485-
_get_axes_msg = """{} has been deprecated in mpl 1.5, please use the
1485+
_get_axes_msg = """{0} has been deprecated in mpl 1.5, please use the
14861486
axes property. A removal date has not been set."""

lib/matplotlib/lines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ def set_linestyle(self, ls):
10481048
ls = ls_mapper_r[ls]
10491049
except KeyError:
10501050
raise ValueError(("You passed in an invalid linestyle, "
1051-
"`{}`. See "
1051+
"`{0}`. See "
10521052
"docs of Line2D.set_linestyle for "
10531053
"valid values.").format(ls))
10541054

lib/matplotlib/quiver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ def _h_arrows(self, length):
710710
# by a float first, as with 'mid'.
711711
elif self.pivot != 'tail':
712712
raise ValueError(("Quiver.pivot must have value in {{'middle', "
713-
"'tip', 'tail'}} not {}").format(self.pivot))
713+
"'tip', 'tail'}} not {0}").format(self.pivot))
714714

715715
tooshort = length < self.minlength
716716
if tooshort.any():

lib/mpl_toolkits/axes_grid1/axes_rgb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ def imshow_rgb(self, r, g, b, **kwargs):
205205
ny, nx = r.shape
206206
if not ((nx, ny) == g.shape == b.shape):
207207
raise ValueError('Input shapes do not match.'
208-
'\nr.shape = {}'
209-
'\ng.shape = {}'
210-
'\nb.shape = {}'
208+
'\nr.shape = {0}'
209+
'\ng.shape = {1}'
210+
'\nb.shape = {2}'
211211
''.format(r.shape, g.shape, b.shape))
212212

213213
R = np.zeros([ny, nx, 3], dtype="d")

0 commit comments

Comments
 (0)