Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some updates to the
ItemFilter
class introduced in #5178. Sorry, I was only able to take a look after it was merged.set
totuple
on eachaccepts
invocation.item
should be annotated as "anything that returnsTrue
foritemadapter.ItemAdapter.is_item
". I'm not sure how to do that at the moment, suggestions are welcome. (I've looked at Protocols for duck typing hints, but that doesn't seem to solve this particular boolean predicate problem.)feed_options is not None
. I'm not sure this is actually a problem, but many classes definefeed_options=None
as default keyword argument, so I suspect there might be a case in which this argument might be passed asNone
and trying to access it like a dict will result in aTypeError
. I'll try to do some more research to make sure this is a real problem (or remove the check and simplify the implementation if it's not).