mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Added super().__repr__() to new __repr__() calls
This commit is contained in:
parent
1e216e47ed
commit
ef5c38dbc6
9 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
#############################################################
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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."""
|
||||
|
|
|
@ -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]]:
|
||||
|
|
Loading…
Reference in a new issue