Total Complexity | 3 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | """ |
||
11 | class AndCondition(CompoundCondition): |
||
12 | """ |
||
13 | A condition or filter that match (i.e return True) if all child conditions match the row. |
||
14 | """ |
||
15 | |||
16 | # ------------------------------------------------------------------------------------------------------------------ |
||
17 | def match(self, row): |
||
18 | """ |
||
19 | Returns True if the row matches all child conditions. Returns False otherwise. |
||
20 | |||
21 | :param dict row: The row. |
||
22 | |||
23 | :rtype: bool |
||
24 | """ |
||
25 | for condition in self._conditions: |
||
26 | if not condition.match(row): |
||
27 | return False |
||
28 | |||
29 | return True |
||
30 | |||
32 |