From b6104fa10b5276e4047cff6ae0a88deb12f7a83d Mon Sep 17 00:00:00 2001 From: RumovZ Date: Sun, 17 Oct 2021 21:53:43 +0200 Subject: [PATCH] Use language that mypy understands --- qt/aqt/browser/card_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/aqt/browser/card_info.py b/qt/aqt/browser/card_info.py index 370ef8e4c..eeb6f47e5 100644 --- a/qt/aqt/browser/card_info.py +++ b/qt/aqt/browser/card_info.py @@ -41,7 +41,7 @@ class CardInfoDialog(QDialog): self.GEOMETRY_KEY = geometry_key or self.GEOMETRY_KEY if window_title: self.setWindowTitle(window_title) - self._setup_ui(card and card.id) + self._setup_ui(card.id if card else None) self.show() def _setup_ui(self, card_id: CardId | None) -> None: @@ -107,7 +107,7 @@ class CardInfoManager: def set_card(self, card: Card | None) -> None: self._card = card if self._dialog: - self._dialog.update_card(card and card.id) + self._dialog.update_card(card.id if card else None) def close(self) -> None: if self._dialog: