mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
PEP8 editorMode
This commit is contained in:
parent
3beea5e1e4
commit
404a1a1f6d
4 changed files with 7 additions and 7 deletions
|
@ -75,7 +75,7 @@ class AddCards(QMainWindow):
|
|||
self.mw,
|
||||
self.form.fieldsArea,
|
||||
self,
|
||||
editorMode=aqt.editor.EditorMode.ADD_CARDS,
|
||||
editor_mode=aqt.editor.EditorMode.ADD_CARDS,
|
||||
)
|
||||
self.editor.web.eval("noteEditorPromise.then(() => activateStickyShortcuts());")
|
||||
|
||||
|
|
|
@ -422,7 +422,7 @@ class Browser(QMainWindow):
|
|||
self.mw,
|
||||
self.form.fieldsArea,
|
||||
self,
|
||||
editorMode=aqt.editor.EditorMode.BROWSER,
|
||||
editor_mode=aqt.editor.EditorMode.BROWSER,
|
||||
)
|
||||
gui_hooks.editor_did_init.remove(add_preview_button)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class EditCurrent(QDialog):
|
|||
self.mw,
|
||||
self.form.fieldsArea,
|
||||
self,
|
||||
editorMode=aqt.editor.EditorMode.EDIT_CURRENT,
|
||||
editor_mode=aqt.editor.EditorMode.EDIT_CURRENT,
|
||||
)
|
||||
self.editor.card = self.mw.reviewer.card
|
||||
self.editor.set_note(self.mw.reviewer.card.note(), focusTo=0)
|
||||
|
|
|
@ -104,7 +104,7 @@ class Editor:
|
|||
parentWindow: QWidget,
|
||||
addMode: bool | None = None,
|
||||
*,
|
||||
editorMode: EditorMode = EditorMode.EDIT_CURRENT,
|
||||
editor_mode: EditorMode = EditorMode.EDIT_CURRENT,
|
||||
) -> None:
|
||||
self.mw = mw
|
||||
self.widget = widget
|
||||
|
@ -112,9 +112,9 @@ class Editor:
|
|||
self.note: Note | None = None
|
||||
# legacy argument provided?
|
||||
if addMode is not None:
|
||||
editorMode = EditorMode.ADD_CARDS if addMode else EditorMode.EDIT_CURRENT
|
||||
self.addMode = editorMode is EditorMode.ADD_CARDS
|
||||
self.editorMode = editorMode
|
||||
editor_mode = EditorMode.ADD_CARDS if addMode else EditorMode.EDIT_CURRENT
|
||||
self.addMode = editor_mode is EditorMode.ADD_CARDS
|
||||
self.editorMode = editor_mode
|
||||
self.currentField: int | None = None
|
||||
# Similar to currentField, but not set to None on a blur. May be
|
||||
# outside the bounds of the current notetype.
|
||||
|
|
Loading…
Reference in a new issue