:param maxsize: If not None, will truncate the resulting repr to that specific size, using ellipsis somewhere in the middle to hide the extra text. If None, will not impose any size limits on the returning repr.
(self, maxsize: Optional[int])
| 42 | """ |
| 43 | |
| 44 | def __init__(self, maxsize: Optional[int]) -> None: |
| 45 | """ |
| 46 | :param maxsize: |
| 47 | If not None, will truncate the resulting repr to that specific size, using ellipsis |
| 48 | somewhere in the middle to hide the extra text. |
| 49 | If None, will not impose any size limits on the returning repr. |
| 50 | """ |
| 51 | super().__init__() |
| 52 | # ``maxstring`` is used by the superclass, and needs to be an int; using a |
| 53 | # very large number in case maxsize is None, meaning we want to disable |
| 54 | # truncation. |
| 55 | self.maxstring = maxsize if maxsize is not None else 1_000_000_000 |
| 56 | self.maxsize = maxsize |
| 57 | |
| 58 | def repr(self, x: object) -> str: |
| 59 | try: |
nothing calls this directly
no outgoing calls
no test coverage detected