Add a condition choice mixin and operators for working with lists of items.

Review Request #8365 — Created Aug. 30, 2016 and submitted

Information

Djblets
release-0.10.x
b85aee4...

Reviewers

This changes the matching logic to give more control to the
BaseConditionChoice, and then adds a new mixin for condition choices
that want to match against the items in a list value. Normally, the
choice would need to either match against the list itself, or would need
operators designed to work with that list. This mixin allows existing
operators (like string comparison operators) to apply to each item in
the list, so that operators and choices can be reused.

There are also two new operators for matching whether a list has one or
more specified items, for those choices that do want to operate on a
list as a whole.

Unit tests pass.

Tested this manually with some pending work.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/conditions/tests/test_choices.py
        djblets/conditions/tests/test_operators.py
        djblets/conditions/conditions.py
        djblets/conditions/choices.py
        djblets/conditions/operators.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/conditions/tests/test_choices.py
        djblets/conditions/tests/test_operators.py
        djblets/conditions/conditions.py
        djblets/conditions/choices.py
        djblets/conditions/operators.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (0a1877e)
Loading...