etlt.condition.Condition.Condition.match()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 2
dl 0
loc 8
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
1 1
import abc
2
from typing import Any, Dict
3
4 1
5
class Condition(metaclass=abc.ABCMeta):
6
    """
7
    An abstract parent class for conditions.
8
    """
9
10 1
    # ------------------------------------------------------------------------------------------------------------------
11 1
    @abc.abstractmethod
12
    def match(self, row: Dict[str, Any]) -> bool:
13
        """
14
        Returns True if the row matches this condition. Returns False otherwise.
15
16
        :param row: The row.
17
        """
18
        raise NotImplementedError()
19
20
# ----------------------------------------------------------------------------------------------------------------------
21