Skip to content

Add entities filter #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 24, 2016
Merged

Add entities filter #409

merged 6 commits into from
Sep 24, 2016

Conversation

jsmnbom
Copy link
Member

@jsmnbom jsmnbom commented Sep 13, 2016

Should ideally superseed #375.
We could also add individual filters for each Entity (which use this function)...

Not entirely happy with the docstring at line 98-99, but I think it's the best we can do.

This is the first of two revisions to the filter system (the second one will change the way to AND/OR them).

Should ideally superseed #375.
@jsmnbom jsmnbom added the 📋 pending-review work status: pending-review label Sep 13, 2016
We're testing for a string in list, not the other way around :P
@jh0ker jh0ker added this to the 5.1 milestone Sep 20, 2016
Copy link
Member

@jh0ker jh0ker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you got a bit confused here.

The filters list of MessageHandler is also operating on an OR basis (at least up until v5.0). If I'm not mistaken, the example in the docstring does not do what it says it does.

In the light of #411, I don't think we should use a list here at all, it will be too confusing once the bitwise operators are in the game.

I recommend to change it to singular Filters.entity(entity_type). This also makes the docstring less of an issue 👍

@jh0ker jh0ker removed the 📋 pending-review work status: pending-review label Sep 20, 2016
@jh0ker
Copy link
Member

jh0ker commented Sep 20, 2016

I just realized that I was the one to say we should use a list here... To be fair though, the #411 PR was not planned at that point. And I still like the higher-order function.

Also remove the faulty example completely since it should be no longer needed.
@jsmnbom jsmnbom merged commit 5f6138b into master Sep 24, 2016
@jsmnbom jsmnbom mentioned this pull request Sep 24, 2016
@jsmnbom jsmnbom deleted the entities-filter branch September 24, 2016 21:33
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2020
@Bibo-Joshi Bibo-Joshi added 🔌 enhancement pr description: enhancement and removed enhancement labels Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔌 enhancement pr description: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy