Return a detailed string representation of the object tree.
(self)
| 2995 | return "\n".join(lines) + "\n" |
| 2996 | |
| 2997 | def __repr__(self) -> str: |
| 2998 | """Return a detailed string representation of the object tree.""" |
| 2999 | if not self.isopen: |
| 3000 | return "<closed File>" |
| 3001 | |
| 3002 | # Print all the nodes (Group and Leaf objects) on object tree |
| 3003 | lines = [ |
| 3004 | f"File(filename={self.filename!s}, title={self.title!r}, " |
| 3005 | f"mode={self.mode!r}, root_uep={self.root_uep!r}, " |
| 3006 | f"filters={self.filters!r})" |
| 3007 | ] |
| 3008 | for group in self.walk_groups("/"): |
| 3009 | lines.append(f"{group}") |
| 3010 | for kind in self._node_kinds[1:]: |
| 3011 | for node in self.list_nodes(group, kind): |
| 3012 | lines.append(f"{node!r}") |
| 3013 | return "\n".join(lines) + "\n" |
| 3014 | |
| 3015 | def _update_node_locations(self, oldpath: str, newpath: str) -> None: |
| 3016 | """Update location information of nodes under `oldpath`. |
nothing calls this directly
no test coverage detected