mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Fix lint errors
This commit is contained in:
parent
939d833e12
commit
a32ef31382
3 changed files with 6 additions and 7 deletions
|
@ -382,8 +382,7 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
|
|||
def onBridgeCmd(self, cmd: str) -> Any:
|
||||
# focus lost or key/button pressed?
|
||||
if cmd.startswith("blur") or cmd.startswith("key"):
|
||||
(type, ord_str) = cmd.split(":", 1)
|
||||
ord = int(ord_str)
|
||||
(type, _) = cmd.split(":", 1)
|
||||
if type == "blur":
|
||||
self.currentField = None
|
||||
else:
|
||||
|
@ -458,7 +457,6 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
|
|||
|
||||
@on_editor_ready
|
||||
def load_note(self, mid: int, focus_to: int | None = None) -> None:
|
||||
|
||||
self.widget.show()
|
||||
|
||||
def oncallback(arg: Any) -> None:
|
||||
|
|
|
@ -15,8 +15,10 @@ from functools import partial, wraps
|
|||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Any, Literal, Union
|
||||
|
||||
import aqt
|
||||
import requests
|
||||
from send2trash import send2trash
|
||||
|
||||
import aqt
|
||||
from anki._legacy import DeprecatedNamesMixinForModule
|
||||
from anki.collection import Collection, HelpPage
|
||||
from anki.httpclient import HttpClient
|
||||
|
@ -30,9 +32,9 @@ from anki.utils import (
|
|||
version_with_build,
|
||||
)
|
||||
from aqt.qt import *
|
||||
from aqt.qt import QT_VERSION_STR # noqa: F401
|
||||
from aqt.qt import (
|
||||
PYQT_VERSION_STR,
|
||||
QT_VERSION_STR, # noqa: F401
|
||||
QAction,
|
||||
QApplication,
|
||||
QCheckBox,
|
||||
|
@ -82,7 +84,6 @@ from aqt.qt import (
|
|||
traceback,
|
||||
)
|
||||
from aqt.theme import theme_manager
|
||||
from send2trash import send2trash
|
||||
|
||||
if TYPE_CHECKING:
|
||||
TextFormat = Literal["plain", "rich", "markdown"]
|
||||
|
@ -1014,6 +1015,7 @@ def show_in_folder(path: str) -> None:
|
|||
def _show_in_folder_win32(path: str) -> None:
|
||||
import win32con
|
||||
import win32gui
|
||||
|
||||
from aqt import mw
|
||||
|
||||
def focus_explorer():
|
||||
|
|
|
@ -91,7 +91,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
const [onContextMenu, contextMenuItems] = setupContextMenu();
|
||||
let contextMenuInput: EditingInputAPI | null = null;
|
||||
|
||||
|
||||
function quoteFontFamily(fontFamily: string): string {
|
||||
// generic families (e.g. sans-serif) must not be quoted
|
||||
if (!/^[-a-z]+$/.test(fontFamily)) {
|
||||
|
|
Loading…
Reference in a new issue