Passed
Push — master ( 4cb748...589c2a )
by P.R.
01:36
created

sdoc.io.SDocIO.SDocIO.title()   A

Complexity

Conditions 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 9
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nop 2
crap 1
1 1
from cleo.io.io import IO
2
3
4 1
class SDocIO(IO):
5
    """
6
    IO object with title.
7
    """
8
9
    # ------------------------------------------------------------------------------------------------------------------
10 1
    def title(self, message: str) -> None:
11
        """
12
        Writes a title to the output.
13
14
        :param str message: The title of a section.
15
        """
16 1
        self.write_line(['<title>%s</>' % message,
17
                         '<title>%s</>' % ('=' * len(message)),
18
                         ''])
19
20
# ----------------------------------------------------------------------------------------------------------------------
21