-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(model): Rework list filtering [WIP]
TODO: Update `_ListFilter.__iter__` and `__contains__` with new logic This commit reworks the code that handles 'by_X' style list filtering. The new code can now also filter on attributes that contain lists, where an element matches if a filtering target is contained (or not contained) in the list. This also introduces the 'by_class' filter, which uses a subclass check to filter a list. It replaces 'by_type' wherever it was used to filter on the class name. The 'by_type' special handling will eventually be removed, so that it always filters on the 'type' attribute of the list members; until that happens, a warning will be emitted when using 'by_type' to filter on the class name.
- Loading branch information
1 parent
316f1d0
commit e9ea787
Showing
2 changed files
with
143 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters