8000 Fixed error messages substitution. · pelson/matplotlib@eb37499 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb37499

Browse files
author
Phil Elson
committed
Fixed error messages substitution.
1 parent bd0fd6e commit eb37499

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

lib/matplotlib/figure.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,8 @@ def add_axes(self, *args, **kwargs):
697697
if ispolar:
698698
if projection is not None and projection != 'polar':
699699
raise ValueError(
700-
"polar=True, yet projection='%s'. " +
701-
"Only one of these arguments should be supplied." %
702-
projection)
700+
"polar=True, yet projection='%s'. " % projection +
701+
"Only one of these arguments should be supplied.")
703702
projection = 'polar'
704703

705704
if isinstance(projection, basestring) or projection is None:
@@ -708,7 +707,8 @@ def add_axes(self, *args, **kwargs):
708707
projection_class, extra_kwargs = projection._as_mpl_axes()
709708
kwargs.update(**extra_kwargs)
710709
else:
711-
TypeError('projection must be a string, None or implement a _as_mpl_axes method. Got %r' % projection)
710+
TypeError('projection must be a string, None or implement a '
711+
'_as_mpl_axes method. Got %r' % projection)
712712

713713
a = projection_factory(projection, self, rect, **kwargs)
714714

@@ -762,9 +762,8 @@ def add_subplot(self, *args, **kwargs):
762762
if ispolar:
763763
if projection is not None:
764764
raise ValueError(
765-
"polar=True, yet projection=%r. " +
766-
"Only one of these arguments should be supplied." %
767-
projection)
765+
"polar=True, yet projection=%r. " % projection +
766+
"Only one of these arguments should be supplied.")
768767
projection = 'polar'
769768

770769
if isinstance(projection, basestring) or projection is None:
@@ -773,7 +772,8 @@ def add_subplot(self, *args, **kwargs):
773772
projection_class, extra_kwargs = projection._as_mpl_axes()
774773
kwargs.update(**extra_kwargs)
775774
else:
776-
TypeError('projection must be a string, None or implement a _as_mpl_axes method. Got %r' % projection)
775+
TypeError(&# 95EB 39;projection must be a string, None or implement a '
776+
'_as_mpl_axes method. Got %r' % projection)
777777

778778
# Remake the key without projection kwargs:
779779
key = self._make_key(*args, **kwargs)
@@ -1058,9 +1058,8 @@ def gca(self, **kwargs):
10581058
if ispolar:
10591059
if projection is not None and projection != 'polar':
10601060
raise ValueError(
1061-
"polar=True, yet projection='%s'. " +
1062-
"Only one of these arguments should be supplied." %
1063-
projection)
1061+
"polar=True, yet projection='%s'. " % projection +
1062+
"Only one of these arguments should be supplied.")
10641063
projection = 'polar'
10651064

10661065
projection_class = get_projection_class(projection)

0 commit comments

Comments
 (0)
0