Completed
Push — master ( ba98c2...ab79be )
by P.R.
01:26
created

test.Worker.VoidConstantWorker   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 2
1
from pystratum_backend.ConstantWorker import ConstantWorker
2
from pystratum_backend.StratumStyle import StratumStyle
3
4
5
class VoidConstantWorker(ConstantWorker):
6
    """
7
    Constant worker that does nothing.
8
    """
9
10
    # ------------------------------------------------------------------------------------------------------------------
11
    def __init__(self, io: StratumStyle):
12
        """
13
        Object constructor.
14
15
        :param io: The Output decorator.
16
        """
17
        self._io: StratumStyle = io
18
19
    # ------------------------------------------------------------------------------------------------------------------
20
    def execute(self) -> int:
21
        """
22
        Does the actual execution of the constant command for the backend. Returns 0 on success. Otherwise returns
23
        nonzero.
24
25
        :rtype: int
26
        """
27
        self._io.title('Constants')
28
29
        return 0
30
31
# ----------------------------------------------------------------------------------------------------------------------
32