Add type annotation for FILTERS dict

Fixes #2120

The FILTERS dict was missing a type annotation, causing Pylance
to report partially unknown types for Environment.filters. This
adds the annotation using the existing F TypeVar.
This commit is contained in:
contributor 2026-03-23 02:31:10 +08:00
parent 5ef70112a1
commit b53b290d73

View File

@ -1809,7 +1809,7 @@ async def async_select_or_reject(
yield item
FILTERS = {
FILTERS: dict[str, F] = {
"abs": abs,
"attr": do_attr,
"batch": do_batch,