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

TrueCondition   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 25
ccs 3
cts 5
cp 0.6
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A scheme() 0 8 1
A 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 TrueCondition(SimpleCondition):
12
    """
13
    A true condition always evaluates to True.
14
    """
15
16
    # ------------------------------------------------------------------------------------------------------------------
17 1
    def match(self, row):
18
        """
19
        Always returns true.
20
21
        :param dict row: The row, ignored.
22
23
        :rtype: True
24
        """
25
        return True
26
27
    # ------------------------------------------------------------------------------------------------------------------
28 1
    @property
29
    def scheme(self):
30
        """
31
        Returns 'true'.
32
33
        :rtype: str
34
        """
35
        return 'true'
36
37
# ----------------------------------------------------------------------------------------------------------------------
38