Completed
Push — master ( 00dd46...452f18 )
by P.R.
01:48
created

FalseCondition.scheme()   A

Complexity

Conditions 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.125

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 8
ccs 1
cts 2
cp 0.5
crap 1.125
rs 9.4285
c 0
b 0
f 0
1
"""
2
ETLT
3
4
Copyright 2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8 1
from etlt.condition.SimpleCondition import SimpleCondition
9
10
11 1
class FalseCondition(SimpleCondition):
12
    """
13
    A false condition always evaluates to False.
14
    """
15
16
    # ------------------------------------------------------------------------------------------------------------------
17 1
    def match(self, row):
18
        """
19
        Always returns False.
20
21
        :param dict row: The row, ignored
22
23
        :rtype: False
24
        """
25
        return False
26
27
    # ------------------------------------------------------------------------------------------------------------------
28 1
    @property
29
    def scheme(self):
30
        """
31
        Returns 'false'.
32
33
        :rtype: str
34
        """
35
        return 'false'
36
37
# ----------------------------------------------------------------------------------------------------------------------
38