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

test.Worker.VoidRoutineLoaderWorker   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 2
1
from typing import List, Optional
2
3
from pystratum_backend.RoutineLoaderWorker import RoutineLoaderWorker
4
from pystratum_backend.StratumStyle import StratumStyle
5
6
7
class VoidRoutineLoaderWorker(RoutineLoaderWorker):
8
    """
9
    Routine loader worker that does nothing.
10
    """
11
12
    # ------------------------------------------------------------------------------------------------------------------
13
    def __init__(self, io: StratumStyle):
14
        """
15
        Object constructor.
16
17
        :param io: The Output decorator.
18
        """
19
        self._io: StratumStyle = io
20
21
    # ------------------------------------------------------------------------------------------------------------------
22
    def execute(self, file_names: Optional[List[str]] = None) -> int:
23
        """
24
        Does the actual execution of the routine loader command for the backend. Returns 0 on success. Otherwise
25
        returns nonzero.
26
27
        :param list[str]|None file_names: The sources that must be loaded. If none all sources (if required) will
28
                                          loaded.
29
30
        :rtype: int
31
        """
32
        self._io.title('Loader')
33
34
        return 0
35
36
# ----------------------------------------------------------------------------------------------------------------------
37