Completed
Pull Request — master (#43)
by Oleg
02:07
created

SdocStyle   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
dl 0
loc 26
ccs 9
cts 9
cp 1
rs 10
c 3
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 20 1
1 1
from cleo import OutputFormatterStyle
2 1
from cleo.styles import CleoStyle
3
4
5 1
class SdocStyle(CleoStyle):
6
    """
7
    Output style for SDoc.
8
    """
9
10
    # ------------------------------------------------------------------------------------------------------------------
11 1
    def __init__(self, input, output):
12
        """
13
        Object constructor.
14
15
        :param cleo.inputs.input.Input input: The input object.
16
        :param cleo.outputs.output.Output output: The output object.
17
        """
18 1
        CleoStyle.__init__(self, input, output)
19
20
        # Style for file system objects (e.g. file and directory names).
21 1
        style = OutputFormatterStyle('green', None, ['bold'])
22 1
        output.get_formatter().set_style('fso', style)
23
24
        # Style for errors.
25 1
        style = OutputFormatterStyle('red', None, ['bold'])
26 1
        output.get_formatter().set_style('err', style)
27
28
        # Style for SDoc1 notices.
29 1
        style = OutputFormatterStyle('yellow')
30 1
        output.get_formatter().set_style('notice', style)
31
32
# ----------------------------------------------------------------------------------------------------------------------
33