If *prop* is *None*, return a list of strings of all settable properties and their valid values. If *prop* is not *None*, it is a valid property name and that property will be returned as a string of property : valid values.
(self, prop=None, leadingspace=2)
| 1674 | return f':meth:`{s} <{target}>`{aliases}' |
| 1675 | |
| 1676 | def pprint_setters(self, prop=None, leadingspace=2): |
| 1677 | """ |
| 1678 | If *prop* is *None*, return a list of strings of all settable |
| 1679 | properties and their valid values. |
| 1680 | |
| 1681 | If *prop* is not *None*, it is a valid property name and that |
| 1682 | property will be returned as a string of property : valid |
| 1683 | values. |
| 1684 | """ |
| 1685 | if leadingspace: |
| 1686 | pad = ' ' * leadingspace |
| 1687 | else: |
| 1688 | pad = '' |
| 1689 | if prop is not None: |
| 1690 | accepts = self.get_valid_values(prop) |
| 1691 | return f'{pad}{prop}: {accepts}' |
| 1692 | |
| 1693 | lines = [] |
| 1694 | for prop in sorted(self.get_setters()): |
| 1695 | accepts = self.get_valid_values(prop) |
| 1696 | name = self.aliased_name(prop) |
| 1697 | lines.append(f'{pad}{name}: {accepts}') |
| 1698 | return lines |
| 1699 | |
| 1700 | def pprint_setters_rest(self, prop=None, leadingspace=4): |
| 1701 | """ |
no test coverage detected