Fix missing "Optional" import and lint
This commit is contained in:
parent
5bd38ce0a5
commit
c839cda19f
@ -2478,6 +2478,7 @@ Are you sure you want to continue?"""
|
|||||||
# Card Info Dialog
|
# Card Info Dialog
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
class CardInfoDialog(QDialog):
|
class CardInfoDialog(QDialog):
|
||||||
silentlyClose = True
|
silentlyClose = True
|
||||||
|
|
||||||
|
@ -215,10 +215,16 @@ class CardLayout(QDialog):
|
|||||||
"_anki/reviewer.js",
|
"_anki/reviewer.js",
|
||||||
]
|
]
|
||||||
pform.frontWeb.stdHtml(
|
pform.frontWeb.stdHtml(
|
||||||
self.mw.reviewer.revHtml(), css=["_anki/reviewer.css"], js=jsinc, context=self
|
self.mw.reviewer.revHtml(),
|
||||||
|
css=["_anki/reviewer.css"],
|
||||||
|
js=jsinc,
|
||||||
|
context=self,
|
||||||
)
|
)
|
||||||
pform.backWeb.stdHtml(
|
pform.backWeb.stdHtml(
|
||||||
self.mw.reviewer.revHtml(), css=["_anki/reviewer.css"], js=jsinc, context=self
|
self.mw.reviewer.revHtml(),
|
||||||
|
css=["_anki/reviewer.css"],
|
||||||
|
js=jsinc,
|
||||||
|
context=self,
|
||||||
)
|
)
|
||||||
pform.frontWeb.set_bridge_command(self._on_bridge_cmd, self)
|
pform.frontWeb.set_bridge_command(self._on_bridge_cmd, self)
|
||||||
pform.backWeb.set_bridge_command(self._on_bridge_cmd, self)
|
pform.backWeb.set_bridge_command(self._on_bridge_cmd, self)
|
||||||
|
@ -7,7 +7,7 @@ See pylib/anki/hooks.py
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any, Callable, Dict, List, Tuple
|
from typing import Any, Callable, Dict, List, Optional, Tuple
|
||||||
|
|
||||||
import anki
|
import anki
|
||||||
import aqt
|
import aqt
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Optional, Any
|
from typing import Any, Optional
|
||||||
|
|
||||||
import aqt
|
import aqt
|
||||||
from anki.lang import _
|
from anki.lang import _
|
||||||
@ -49,7 +49,9 @@ class Toolbar:
|
|||||||
link_handler = link_handler or self._linkHandler
|
link_handler = link_handler or self._linkHandler
|
||||||
self.web.set_bridge_command(link_handler, web_context)
|
self.web.set_bridge_command(link_handler, web_context)
|
||||||
self.web.stdHtml(
|
self.web.stdHtml(
|
||||||
self._body % self._centerLinks(), css=["_anki/toolbar.css"], context=web_context
|
self._body % self._centerLinks(),
|
||||||
|
css=["_anki/toolbar.css"],
|
||||||
|
context=web_context,
|
||||||
)
|
)
|
||||||
self.web.adjustHeightToFit()
|
self.web.adjustHeightToFit()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user