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

test.Worker.VoidConstantWorker.VoidConstantWorker.__init__()   A

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 2
dl 0
loc 7
rs 10
c 0
b 0
f 0
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