reports: Add RelatedPostings.__repr__() method.

This commit is contained in:
Brett Smith 2020-06-02 13:26:56 -04:00
parent 7301bfc099
commit 39c9c0d83a

View file

@ -195,6 +195,9 @@ class RelatedPostings(Sequence[data.Posting]):
for value, posts in mapping.items(): for value, posts in mapping.items():
yield value, cls(posts, _can_own=True) yield value, cls(posts, _can_own=True)
def __repr__(self) -> str:
return f'<{type(self).__name__} {self._postings!r}>'
@overload @overload
def __getitem__(self: RelatedType, index: int) -> data.Posting: ... def __getitem__(self: RelatedType, index: int) -> data.Posting: ...