Added super().__repr__() to new __repr__() calls

This commit is contained in:
evandrocoan 2020-05-28 18:14:44 -03:00
parent 1e216e47ed
commit ef5c38dbc6
9 changed files with 9 additions and 9 deletions

View file

@ -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

View file

@ -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]

View file

@ -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()

View file

@ -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
#############################################################

View file

@ -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:

View file

@ -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,

View file

@ -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)

View file

@ -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."""

View file

@ -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]]: