Return the getters and actual values as list of strings.
(self)
| 1774 | return d |
| 1775 | |
| 1776 | def pprint_getters(self): |
| 1777 | """Return the getters and actual values as list of strings.""" |
| 1778 | lines = [] |
| 1779 | for name, val in sorted(self.properties().items()): |
| 1780 | if getattr(val, 'shape', ()) != () and len(val) > 6: |
| 1781 | s = str(val[:6]) + '...' |
| 1782 | else: |
| 1783 | s = str(val) |
| 1784 | s = s.replace('\n', ' ') |
| 1785 | if len(s) > 50: |
| 1786 | s = s[:50] + '...' |
| 1787 | name = self.aliased_name(name) |
| 1788 | lines.append(f' {name} = {s}') |
| 1789 | return lines |
| 1790 | |
| 1791 | |
| 1792 | def getp(obj, property=None): |
no test coverage detected