Passed
Branch master (17b603)
by P.R.
01:31
created

etlt.condition.FalseCondition   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 36
ccs 5
cts 7
cp 0.7143
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A FalseCondition.scheme() 0 8 1
A FalseCondition.match() 0 9 1
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 1
    def scheme(self):
30
        """
31
        Returns 'false'.
32
33
        :rtype: str
34
        """
35
        return 'false'
36
37
# ----------------------------------------------------------------------------------------------------------------------
38