(object, width, allowance)
| 875 | |
| 876 | |
| 877 | def _wrap_bytes_repr(object, width, allowance): |
| 878 | current = b'' |
| 879 | last = len(object) // 4 * 4 |
| 880 | for i in range(0, len(object), 4): |
| 881 | part = object[i: i+4] |
| 882 | candidate = current + part |
| 883 | if i == last: |
| 884 | width -= allowance |
| 885 | if len(repr(candidate)) > width: |
| 886 | if current: |
| 887 | yield repr(current) |
| 888 | current = part |
| 889 | else: |
| 890 | current = candidate |
| 891 | if current: |
| 892 | yield repr(current) |
no outgoing calls
no test coverage detected
searching dependent graphs…