Test Failed
Push — master ( 728016...1ac98c )
by P.R.
01:34
created

SdocStyle   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 20 1
1 1
from cleo import OutputFormatterStyle
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Bug introduced by
The name OutputFormatterStyle does not seem to exist in module cleo.
Loading history...
2
from cleo.styles import CleoStyle
3
4
5
class SdocStyle(CleoStyle):
6
    """
7
    Output style for SDocApplication.
8
    """
9
10
    # ------------------------------------------------------------------------------------------------------------------
11
    def __init__(self, input, output):
0 ignored issues
show
Bug Best Practice introduced by
This seems to re-define the built-in input.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
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
        CleoStyle.__init__(self, input, output)
19
20
        # Style for file system objects (e.g. file and directory names).
21
        style = OutputFormatterStyle('green', None, ['bold'])
22
        output.get_formatter().set_style('fso', style)
23
24
        # Style for errors.
25
        style = OutputFormatterStyle('red', None, ['bold'])
26
        output.get_formatter().set_style('error', style)
27
28
        # Style for SDoc1 notices.
29
        style = OutputFormatterStyle('yellow')
30
        output.get_formatter().set_style('notice', style)
31
32
# ----------------------------------------------------------------------------------------------------------------------
33