From c4f6ec99f73bdab6285e579906bb7346e4b1cc2d Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 8 Mar 2021 23:24:14 +1000 Subject: [PATCH] Remove collection repr I find the extra info it adds to tracebacks in pytest just makes them harder to read. --- pylib/anki/collection.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pylib/anki/collection.py b/pylib/anki/collection.py index 9bcde267b..73b3b1a5c 100644 --- a/pylib/anki/collection.py +++ b/pylib/anki/collection.py @@ -97,11 +97,6 @@ class Collection: self.conf = ConfigManager(self) self._loadScheduler() - def __repr__(self) -> str: - d = dict(self.__dict__) - del d["models"] - return f"{super().__repr__()} {pprint.pformat(d, width=300)}" - def name(self) -> Any: return os.path.splitext(os.path.basename(self.path))[0]