etlt.condition.Condition   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 19
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A Condition.match() 0 8 1
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