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

Skip to content

Commit 882f0e6

Browse files
authored
Merge pull request #21985 from anntzer/glck
Slightly tighten the _get_layout_cache_key API.
2 parents a402aa1 + c8938bb commit 882f0e6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/matplotlib/text.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,14 @@ def update_from(self, other):
272272
self._linespacing = other._linespacing
273273
self.stale = True
274274

275-
def _get_layout_cache_key(self, renderer=None):
275+
def _get_layout_cache_key(self, renderer):
276276
"""
277277
Return a hashable tuple of properties that lets `_get_layout` know
278278
whether a previously computed layout can be reused.
279279
"""
280-
x, y = self.get_unitless_position()
281-
renderer = renderer or self._renderer
282280
return (
283-
x, y, self.get_text(), hash(self._fontproperties),
281+
self.get_unitless_position(), self.get_text(),
282+
hash(self._fontproperties),
284283
self._verticalalignment, self._horizontalalignment,
285284
self._linespacing,
286285
self._rotation, self._rotation_mode, self._transform_rotates_text,

0 commit comments

Comments
 (0)