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

Skip to content

Commit f51595f

Browse files
committed
MNT: Add manual backport of relevant portion of #26198
1 parent c518378 commit f51595f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/matplotlib/_mathtext.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,8 +1802,11 @@ def __init__(self):
18021802
def set_names_and_parse_actions():
18031803
for key, val in vars(p).items():
18041804
if not key.startswith('_'):
1805-
# Set names on everything -- very useful for debugging
1806-
val.setName(key)
1805+
# Set names on (almost) everything -- very useful for debugging
1806+
# token, placeable, and auto_delim are forward references which
1807+
# are left without names to ensure useful error messages
1808+
if key not in ("token", "placeable", "auto_delim"):
1809+
val.setName(key)
18071810
# Set actions
18081811
if hasattr(self, key):
18091812
val.setParseAction(getattr(self, key))

0 commit comments

Comments
 (0)