GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

kerapu.style.KerapuStyle.KerapuStyle.text()   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 3.072

Importance

Changes 0
Metric Value
cc 3
eloc 6
nop 2
dl 0
loc 8
ccs 4
cts 5
cp 0.8
crap 3.072
rs 10
c 0
b 0
f 0
1
from typing import Union
2
3
from cleo import Input, Output
4 1
from cleo.styles import CleoStyle
5
6 1
7 1
class KerapuStyle(CleoStyle):
8
    """
9
    Output style for Kerapu.
10 1
    """
11
12
    # ------------------------------------------------------------------------------------------------------------------
13
    def __init__(self, input_object: Input, output_object: Output) -> None:
14
        """
15
        Object constructor.
16 1
17
        :param Input input_object: The input object.
18
        :param Output output_object: The output object.
19
        """
20
        CleoStyle.__init__(self, input_object, output_object)
21
22
        # Create style notes.
23 1
        output_object.get_formatter().add_style('note', 'yellow', None, ['bold'])
24
25
        # Create style for file and directory names.
26 1
        output_object.get_formatter().add_style('fso', 'white', None, ['bold'])
27
28
    # ------------------------------------------------------------------------------------------------------------------
29 1
    def text(self, message: Union[str, list, None]) -> None:
30
        if isinstance(message, list):
31
            messages = message
32 1
        else:
33 1
            messages = [message]
34
35
        for line in messages:
36 1
            self.writeln(' {0}'.format(line))
37
38
# ----------------------------------------------------------------------------------------------------------------------
39