Completed
Push — master ( 9d90ba...7d87fd )
by P.R.
01:17
created

Condition.match()   A

Complexity

Conditions 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
1
"""
2
ETLT
3
4
Copyright 2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8
import abc
9
10
11
class Condition:
12
    """
13
    An abstract parent class for conditions.
14
    """
15
    # ------------------------------------------------------------------------------------------------------------------
16
    @abc.abstractmethod
17
    def match(self, row):
18
        """
19
        Returns True if the row matches this condition. Returns False otherwise.
20
21
        :param dict row: The row.
22
23
        :rtype: bool
24
        """
25
        raise NotImplementedError()
26
27
    # ------------------------------------------------------------------------------------------------------------------
28