Method
__item
(
node: DataTree | str, continues: tuple[bool, ...], style: AbstractStyle
)
Source from the content-addressed store, hash-verified
| 222 | |
| 223 | @staticmethod |
| 224 | def __item( |
| 225 | node: DataTree | str, continues: tuple[bool, ...], style: AbstractStyle |
| 226 | ) -> Row: |
| 227 | if not continues: |
| 228 | return Row("", "", node) |
| 229 | else: |
| 230 | items = [style.vertical if cont else style.empty for cont in continues] |
| 231 | indent = "".join(items[:-1]) |
| 232 | branch = style.cont if continues[-1] else style.end |
| 233 | pre = indent + branch |
| 234 | fill = "".join(items) |
| 235 | return Row(pre, fill, node) |
| 236 | |
| 237 | def __str__(self) -> str: |
| 238 | return str(self.node) |
Tested by
no test coverage detected