| Total Complexity | 1 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | """ |
||
| 2 | ETLT |
||
| 3 | |||
| 4 | Copyright 2016 Set Based IT Consultancy |
||
| 5 | |||
| 6 | Licence MIT |
||
| 7 | """ |
||
| 8 | 1 | import abc |
|
| 9 | |||
| 10 | |||
| 11 | 1 | class Condition(metaclass=abc.ABCMeta): |
|
| 12 | """ |
||
| 13 | An abstract parent class for conditions. |
||
| 14 | """ |
||
| 15 | |||
| 16 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 17 | 1 | @abc.abstractmethod |
|
| 18 | 1 | def match(self, row): |
|
| 19 | """ |
||
| 20 | Returns True if the row matches this condition. Returns False otherwise. |
||
| 21 | |||
| 22 | :param dict row: The row. |
||
| 23 | |||
| 24 | :rtype: bool |
||
| 25 | """ |
||
| 26 | raise NotImplementedError() |
||
| 27 | |||
| 29 |