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 806ce0e

Browse filesBrowse files
efiringMeeseeksDev[bot]
authored andcommitted
Backport PR #11189: FIX: remove recursive call to str in transform repr
1 parent a3ee438 commit 806ce0e
Copy full SHA for 806ce0e

File tree

Expand file treeCollapse file tree

2 files changed

+1
-9
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+1
-9
lines changed

‎lib/matplotlib/tests/test_scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_scale.py
+1-2Lines 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

Copy file name to clipboardExpand all lines: lib/matplotlib/transforms.py
-7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.