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:
Damien Elmes 2021-01-10 09:02:01 +10:00
parent 4ba4e8ca78
commit 8b877f0a08

View file

@ -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))
)