def from_card(cls, card: Card) -> "CardInfo": return cls( card.id, question=strip_html(card.question()), answer=strip_html(card.answer()), due=card.due, reviews=get_card_reviews(card.id), )
def __init__(self, origin: str, card: Card): super().__init__(origin) self.card_id = card.id self.question = card.question() self.answer = card.answer()