MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / aliased_name_rest

Method aliased_name_rest

lib/matplotlib/artist.py:1659–1674  ·  view source on GitHub ↗

Return 'PROPNAME or alias' if *s* has an alias, else return 'PROPNAME', formatted for reST. For example, for the line markerfacecolor property, which has an alias, return 'markerfacecolor or mfc' and for the transform property, which does not, return 'transf

(self, s, target)

Source from the content-addressed store, hash-verified

1657 }
1658
1659 def aliased_name_rest(self, s, target):
1660 """
1661 Return 'PROPNAME or alias' if *s* has an alias, else return 'PROPNAME',
1662 formatted for reST.
1663
1664 For example, for the line markerfacecolor property, which has an
1665 alias, return 'markerfacecolor or mfc' and for the transform
1666 property, which does not, return 'transform'.
1667 """
1668 # workaround to prevent "reference target not found"
1669 if target in self._NOT_LINKABLE:
1670 return f'``{s}``'
1671
1672 aliases = ''.join(
1673 f' or :meth:`{a} <{target}>`' for a in sorted(self.aliasd.get(s, [])))
1674 return f':meth:`{s} <{target}>`{aliases}'
1675
1676 def pprint_setters(self, prop=None, leadingspace=2):
1677 """

Callers 1

pprint_setters_restMethod · 0.95

Calls 2

joinMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected