diff --git a/pylib/anki/cards.py b/pylib/anki/cards.py index f07852450..4f185857d 100644 --- a/pylib/anki/cards.py +++ b/pylib/anki/cards.py @@ -193,7 +193,7 @@ class Card: del d["_render_output"] del d["col"] del d["timerStarted"] - return pprint.pformat(d, width=300) + return f"{super().__repr__()} {pprint.pformat(d, width=300)}" def userFlag(self) -> int: return self.flags & 0b111 diff --git a/pylib/anki/collection.py b/pylib/anki/collection.py index 0c947d391..5a582d1fb 100644 --- a/pylib/anki/collection.py +++ b/pylib/anki/collection.py @@ -68,7 +68,7 @@ class Collection: d = dict(self.__dict__) del d["models"] del d["backend"] - return pprint.pformat(d, width=300) + return f"{super().__repr__()} {pprint.pformat(d, width=300)}" def name(self) -> Any: n = os.path.splitext(os.path.basename(self.path))[0] diff --git a/pylib/anki/db.py b/pylib/anki/db.py index b823eb9aa..348a52d7f 100644 --- a/pylib/anki/db.py +++ b/pylib/anki/db.py @@ -30,7 +30,7 @@ class DB: def __repr__(self) -> str: d = dict(self.__dict__) del d["_db"] - return pprint.pformat(d, width=300) + return f"{super().__repr__()} {pprint.pformat(d, width=300)}" def execute(self, sql: str, *a, **ka) -> Cursor: s = sql.strip().lower() diff --git a/pylib/anki/decks.py b/pylib/anki/decks.py index 87a9dc340..21af1a812 100644 --- a/pylib/anki/decks.py +++ b/pylib/anki/decks.py @@ -84,7 +84,7 @@ class DeckManager: def __repr__(self) -> str: d = dict(self.__dict__) del d["col"] - return pprint.pformat(d, width=300) + return f"{super().__repr__()} {pprint.pformat(d, width=300)}" # Deck save/load ############################################################# diff --git a/pylib/anki/media.py b/pylib/anki/media.py index fb60db197..2d88ac543 100644 --- a/pylib/anki/media.py +++ b/pylib/anki/media.py @@ -64,7 +64,7 @@ class MediaManager: def __repr__(self) -> str: d = dict(self.__dict__) del d["col"] - return pprint.pformat(d, width=300) + return f"{super().__repr__()} {pprint.pformat(d, width=300)}" def connect(self) -> None: if self.col.server: diff --git a/pylib/anki/models.py b/pylib/anki/models.py index ff15c8a3f..74fa04d9d 100644 --- a/pylib/anki/models.py +++ b/pylib/anki/models.py @@ -70,7 +70,7 @@ class ModelManager: def __repr__(self) -> str: d = dict(self.__dict__) del d["col"] - return pprint.pformat(d, width=300) + return f"{super().__repr__()} {pprint.pformat(d, width=300)}" def save( self, diff --git a/pylib/anki/notes.py b/pylib/anki/notes.py index 6227c72e8..3a4088f8d 100644 --- a/pylib/anki/notes.py +++ b/pylib/anki/notes.py @@ -70,7 +70,7 @@ class Note: def __repr__(self) -> str: d = dict(self.__dict__) del d["col"] - return pprint.pformat(d, width=300) + return f"{super().__repr__()} {pprint.pformat(d, width=300)}" def joinedFields(self) -> str: return joinFields(self.fields) diff --git a/pylib/anki/schedv2.py b/pylib/anki/schedv2.py index 34423eacd..62074ca51 100644 --- a/pylib/anki/schedv2.py +++ b/pylib/anki/schedv2.py @@ -46,7 +46,7 @@ class Scheduler: def __repr__(self) -> str: d = dict(self.__dict__) del d["col"] - return pprint.pformat(d, width=300) + return f"{super().__repr__()} {pprint.pformat(d, width=300)}" def getCard(self) -> Optional[Card]: """Pop the next card from the queue. None if finished.""" diff --git a/pylib/anki/tags.py b/pylib/anki/tags.py index c339396b5..3eba489a7 100644 --- a/pylib/anki/tags.py +++ b/pylib/anki/tags.py @@ -30,7 +30,7 @@ class TagManager: def __repr__(self) -> str: d = dict(self.__dict__) del d["col"] - return pprint.pformat(d, width=300) + return f"{super().__repr__()} {pprint.pformat(d, width=300)}" # # List of (tag, usn) def allItems(self) -> List[Tuple[str, int]]: