-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prefilter option to context reference property (#1468)
* Add prefilter option to context reference property Implemented a method to set prefilters on the context reference property and created a new ContextgroupFilter class. Updated relevant imports and code sections to support this functionality. * Fix indentation in value_filter.py Correct the indentation of property type checks to enhance code readability and maintain consistency. This change ensures proper alignment and structure in the conditional statements. * Add prefilters to ContextReferencesProperty Implemented `set_prefilters` method in `ContextReferencesProperty` to support clearing and setting the `context_group` prefilter. Added corresponding unit tests to ensure proper functionality and to handle edge cases, including invalid inputs. * Remove unnecessary f-string in error message Refactor the exception raise to eliminate the unnecessary f-string formatting since no variables are being interpolated. This cleanup simplifies the code and ensures better readability. * Remove ContextGroup filtering and fix typos Deleted the ContextGroupFilter class including its methods and references to the ContextGroup enum. Corrected typos in comments for clarity. * Fix indentation in property type filtration Adjusted indentation to ensure that property types in the filter are correctly and clearly aligned. This enhances readability and maintains consistency in the code formatting structure. * Refactor docstring to improve clarity Simplified the docstring of `parse_options` method for better readability. Changed the description to be more concise and removed unnecessary line breaks. * Remove unused import in test_properties.py Removed the import of `ContextType` and `ContextReferencesProperty` from `test_properties.py` as they were unused. This change reduces unnecessary code clutter and improves maintainability of the test suite. --------- Co-authored-by: Jochem Berends <jochem.berends@ke-works.com>
- Loading branch information
Showing
10 changed files
with
117 additions
and
14 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
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
Oops, something went wrong.