(self, items, stream, indent, allowance, context, level)
| 554 | write(',') |
| 555 | |
| 556 | def _format_namespace_items(self, items, stream, indent, allowance, context, level): |
| 557 | write = stream.write |
| 558 | delimnl = ',\n' + ' ' * indent |
| 559 | last_index = len(items) - 1 |
| 560 | for i, (key, ent) in enumerate(items): |
| 561 | last = i == last_index |
| 562 | write(key) |
| 563 | write('=') |
| 564 | if id(ent) in context: |
| 565 | # Special-case representation of recursion to match standard |
| 566 | # recursive dataclass repr. |
| 567 | write("...") |
| 568 | else: |
| 569 | self._format( |
| 570 | ent, |
| 571 | stream, |
| 572 | self._child_indent(indent, len(key) + 1), |
| 573 | allowance if last else 1, |
| 574 | context, |
| 575 | level, |
| 576 | ) |
| 577 | if not last: |
| 578 | write(delimnl) |
| 579 | elif self._expand: |
| 580 | write(',') |
| 581 | |
| 582 | def _format_items(self, items, stream, indent, allowance, context, level): |
| 583 | write = stream.write |
no test coverage detected