mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
add type to _named_filter()
The ...Value types generated by mypy-protobuf are only available at typechecking time, and pylint chokes on them despite the use of annotations from __future__ - so we either need to quote them, or use # pylint: disable=no-member
This commit is contained in:
parent
4ba4e8ca78
commit
8b877f0a08
1 changed files with 1 additions and 1 deletions
|
@ -1248,7 +1248,7 @@ QTableView {{ gridline-color: {grid} }}
|
|||
ml.addItem(label, self._named_filter(filter_name))
|
||||
return ml
|
||||
|
||||
def _named_filter(self, name: Any) -> Callable:
|
||||
def _named_filter(self, name: "FilterToSearchIn.NamedFilterValue") -> Callable:
|
||||
return lambda: self.setFilter(
|
||||
self.col.backend.filter_to_search(FilterToSearchIn(name=name))
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue