etlt.condition.CompoundCondition   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 30
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A CompoundCondition.append_condition() 0 7 1
A CompoundCondition.__init__() 0 6 1
1
from abc import ABC
2
from typing import List
3
4
from etlt.condition.Condition import Condition
5
6
7
class CompoundCondition(Condition, ABC):
8
    """
9
    Abstract parent class for conditions with one or more child conditions.
10
    """
11
12
    # ------------------------------------------------------------------------------------------------------------------
13
    def __init__(self):
14
        """
15
        Object constructor.
16
        """
17
        self._conditions: List[Condition] = []
18
        """
19
        The list of conditions of this compound condition.
20
        """
21
22
    # ------------------------------------------------------------------------------------------------------------------
23
    def append_condition(self, condition: Condition) -> None:
24
        """
25
        Appends a child condition to the list of conditions of this compound condition.
26
27
        :param condition: The child conditions.
28
        """
29
        self._conditions.append(condition)
30
31
# ----------------------------------------------------------------------------------------------------------------------
32