FalseCondition.match()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 2
dl 0
loc 7
ccs 0
cts 1
cp 0
crap 2
rs 10
c 0
b 0
f 0
1 1
from typing import Any, Dict
2
3
from etlt.condition.SimpleCondition import SimpleCondition
4 1
5
6
class FalseCondition(SimpleCondition):
7
    """
8
    A false condition always evaluates to False.
9
    """
10 1
11
    # ------------------------------------------------------------------------------------------------------------------
12
    def match(self, row: Dict[str, Any]) -> False:
13
        """
14
        Always returns False.
15
16
        :param row: The row, ignored
17
        """
18
        return False
19
20
    # ------------------------------------------------------------------------------------------------------------------
21 1
    @property
22 1
    def scheme(self) -> str:
23
        """
24
        Returns 'false'.
25
        """
26
        return 'false'
27
28
# ----------------------------------------------------------------------------------------------------------------------
29