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

Skip to content

Commit ecba68a

Browse files
authored
Merge pull request matplotlib#11260 from matplotlib/auto-backport-of-pr-11189
Backport PR matplotlib#11189 on branch v2.2.x
2 parents a3ee438 + 806ce0e commit ecba68a

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

lib/matplotlib/tests/test_scale.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,8 @@ def test_logscale_transform_repr():
9191
ax.set_yscale('log')
9292
s = repr(ax.transData)
9393

94-
# check that repr of log transform returns correct string
94+
# check that repr of log transform succeeds
9595
s = repr(Log10Transform(nonpos='clip'))
96-
assert s == "Log10Transform({!r})".format('clip')
9796

9897

9998
@image_comparison(baseline_images=['logscale_nonpos_values'], remove_text=True,

lib/matplotlib/transforms.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,8 +1067,6 @@ def __str__(self):
10671067
_indent_str(self._bbox),
10681068
_indent_str(self._transform)))
10691069

1070-
__repr__ = __str__
1071-
10721070
def get_points(self):
10731071
if self._invalid:
10741072
p = self._bbox.get_points()
@@ -1154,8 +1152,6 @@ def __str__(self):
11541152
_indent_str(self._bbox),
11551153
_indent_str(self._locked_points)))
11561154

1157-
__repr__ = __str__
1158-
11591155
def get_points(self):
11601156
if self._invalid:
11611157
points = self._bbox.get_points()
@@ -1639,9 +1635,6 @@ def inverted(self):
16391635
"""
16401636
raise NotImplementedError()
16411637

1642-
def __repr__(self):
1643-
return str(self)
1644-
16451638

16461639
class TransformWrapper(Transform):
16471640
"""

0 commit comments

Comments
 (0)