From 87838127b03973bbe5646d872545fa9606b20c74 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Wed, 25 May 2022 13:16:40 -0700 Subject: [PATCH] info: replace introspection with explicit f-string --- src/ocrmypdf/pdfinfo/info.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/ocrmypdf/pdfinfo/info.py b/src/ocrmypdf/pdfinfo/info.py index c63bfa03..5828a07a 100644 --- a/src/ocrmypdf/pdfinfo/info.py +++ b/src/ocrmypdf/pdfinfo/info.py @@ -409,15 +409,10 @@ class ImageInfo: return _get_dpi(self._shorthand, (self._width, self._height)) def __repr__(self): - class_locals = { - attr: getattr(self, attr, None) - for attr in dir(self) - if not attr.startswith('_') - } return ( - "" - ).format(**class_locals) + f"" + ) def _find_inline_images(contentsinfo: ContentsInfo) -> Iterator[ImageInfo]: