Merge pull request #493 from glutanimate/type-annotate-editor-card
Type-annotate editor.card
This commit is contained in:
commit
94b90d23fb
@ -868,7 +868,7 @@ QTableView {{ gridline-color: {grid} }}
|
|||||||
else:
|
else:
|
||||||
self.editor.setNote(self.card.note(reload=True), focusTo=self.focusTo)
|
self.editor.setNote(self.card.note(reload=True), focusTo=self.focusTo)
|
||||||
self.focusTo = None
|
self.focusTo = None
|
||||||
self.editor.card = self.card # type: ignore
|
self.editor.card = self.card
|
||||||
self.singleCard = True
|
self.singleCard = True
|
||||||
self._updateFlagsMenu()
|
self._updateFlagsMenu()
|
||||||
gui_hooks.browser_did_change_row(self)
|
gui_hooks.browser_did_change_row(self)
|
||||||
|
@ -19,6 +19,7 @@ from bs4 import BeautifulSoup
|
|||||||
|
|
||||||
import aqt
|
import aqt
|
||||||
import aqt.sound
|
import aqt.sound
|
||||||
|
from anki.cards import Card
|
||||||
from anki.hooks import runFilter
|
from anki.hooks import runFilter
|
||||||
from anki.httpclient import HttpClient
|
from anki.httpclient import HttpClient
|
||||||
from anki.lang import _
|
from anki.lang import _
|
||||||
@ -77,7 +78,7 @@ class Editor:
|
|||||||
self.addMode = addMode
|
self.addMode = addMode
|
||||||
self.currentField: Optional[int] = None
|
self.currentField: Optional[int] = None
|
||||||
# current card, for card layout
|
# current card, for card layout
|
||||||
self.card = None
|
self.card: Optional[Card] = None
|
||||||
self.setupOuter()
|
self.setupOuter()
|
||||||
self.setupWeb()
|
self.setupWeb()
|
||||||
self.setupShortcuts()
|
self.setupShortcuts()
|
||||||
|
Loading…
Reference in New Issue
Block a user