8000 DOC: Format aliases in kwargs tables · matplotlib/matplotlib@edf918b · GitHub
[go: up one dir, main page]

Skip to content

Commit edf918b

Browse files
committed
DOC: Format aliases in kwargs tables
The primary property name was given as link and code-formatted but the aliases were plain-text. This PR adds consistent formatting to the aliases as well, but still does not link them (by setting the `!` prefix).
1 parent ce4b660 commit edf918b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/artist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,8 @@ def aliased_name_rest(self, s, target):
15861586
if target in self._NOT_LINKABLE:
15871587
return f'``{s}``'
15881588

1589-
aliases = ''.join(' or %s' % x for x in sorted(self.aliasd.get(s, [])))
1589+
aliases = ''.join(
1590+
f' or :meth:`{a} <{target}>`' for a in sorted(self.aliasd.get(s, [])))
15901591
return f':meth:`{s} <{target}>`{aliases}'
15911592

15921593
def pprint_setters(self, prop=None, leadingspace=2):

0 commit comments

Comments
 (0)
0