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

sdoc.io.SDocIO   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 19
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A SDocIO.title() 0 9 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