add type hints

This commit is contained in:
neitrinoweb 2020-06-25 17:27:52 +03:00
parent c7db6331cf
commit 69f73b57e7

View file

@ -87,7 +87,7 @@ class CardLayout(QDialog):
self.ignore_change_signals = False
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:
return
self.ord = idx
@ -136,7 +136,7 @@ class CardLayout(QDialog):
self._fieldsOnTemplate(tmpl["afmt"]),
)
def _fieldsOnTemplate(self, fmt):
def _fieldsOnTemplate(self, fmt: str) -> str:
matches = re.findall("{{[^#/}]+?}}", fmt)
chars_allowed = 30
field_names: List[str] = []