diff options
author | Anthon van der Neut <anthon@mnt.org> | 2023-05-01 20:07:58 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2023-05-01 20:07:58 +0200 |
commit | 913318287aacca50246fd44fa5682e3907c1c78a (patch) | |
tree | 6031c22905170e5192a3d7b649751cdcb7503cb8 /comments.py | |
parent | 8b731994b1543d7886af85f926d9eea5a22d0732 (diff) | |
download | ruamel.yaml-913318287aacca50246fd44fa5682e3907c1c78a.tar.gz |
repr of commentedmap simplified
Diffstat (limited to 'comments.py')
-rw-r--r-- | comments.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/comments.py b/comments.py index c6a9703..da2b191 100644 --- a/comments.py +++ b/comments.py @@ -866,13 +866,13 @@ class CommentedMap(ordereddict, CommentedBase): return default def __repr__(self) -> Any: - res = "ordereddict([" + res = "{" sep = '' for k, v in self.items(): - res += f'{sep}({k!r}, {v!r})' + res += f'{sep}{k!r}: {v!r}' if not sep: sep = ', ' - res += '])' + res += '}' return res def non_merged_items(self) -> Any: |