mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
add type hints
This commit is contained in:
parent
c7db6331cf
commit
69f73b57e7
1 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ class CardLayout(QDialog):
|
||||||
self.ignore_change_signals = False
|
self.ignore_change_signals = False
|
||||||
self.update_current_ordinal_and_redraw(self.ord)
|
self.update_current_ordinal_and_redraw(self.ord)
|
||||||
|
|
||||||
def update_current_ordinal_and_redraw(self, idx):
|
def update_current_ordinal_and_redraw(self, idx: int) -> None:
|
||||||
if self.ignore_change_signals:
|
if self.ignore_change_signals:
|
||||||
return
|
return
|
||||||
self.ord = idx
|
self.ord = idx
|
||||||
|
@ -136,7 +136,7 @@ class CardLayout(QDialog):
|
||||||
self._fieldsOnTemplate(tmpl["afmt"]),
|
self._fieldsOnTemplate(tmpl["afmt"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
def _fieldsOnTemplate(self, fmt):
|
def _fieldsOnTemplate(self, fmt: str) -> str:
|
||||||
matches = re.findall("{{[^#/}]+?}}", fmt)
|
matches = re.findall("{{[^#/}]+?}}", fmt)
|
||||||
chars_allowed = 30
|
chars_allowed = 30
|
||||||
field_names: List[str] = []
|
field_names: List[str] = []
|
||||||
|
|
Loading…
Reference in a new issue