etlt.condition.TrueCondition   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 27
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A TrueCondition.match() 0 7 1
A TrueCondition.scheme() 0 6 1
1 1
from typing import Any, Dict
2
3
from etlt.condition.SimpleCondition import SimpleCondition
4 1
5
6
class TrueCondition(SimpleCondition):
7
    """
8
    A true condition always evaluates to True.
9
    """
10 1
11
    # ------------------------------------------------------------------------------------------------------------------
12
    def match(self, row: Dict[str, Any]) -> True:
13
        """
14
        Always returns true.
15
16
        :param dict row: The row, ignored.
17
        """
18
        return True
19
20
    # ------------------------------------------------------------------------------------------------------------------
21 1
    @property
22 1
    def scheme(self) -> str:
23
        """
24
        Returns 'true'.
25
        """
26
        return 'true'
27
28
# ----------------------------------------------------------------------------------------------------------------------
29