You will need to decide whether you care about this warning or not.
filter(my_filter, my_iterable)
is equivalent to:
[item for item in my_iterable if my_filter(item)]
In python 3, it filteracts like a generator, which means it lazily evaluates things, for example:
(item for item in my_iterable if my_filter(item))
I would ignore this particular warning. Pyflakes can give you a more useful result.
source
share