Passed
Branch master (0442a2)
by P.R.
02:00
created

Format   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 7 1
A generate() 0 6 1
1
"""
2
SDoc
3
4
Copyright 2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8
# ----------------------------------------------------------------------------------------------------------------------
9
import abc
10
11
12
class Format:
1 ignored issue
show
Complexity introduced by
This abstract class seems to be used only once.

Abstract classes which are used only once can usually be inlined into the class which already uses this abstract class.

Loading history...
13
    """
14
    Abstract parent class for all formatters for generating output documents in a certain format.
15
    """
16
17
    # ------------------------------------------------------------------------------------------------------------------
18
    def __init__(self, config):
19
        """
20
        Object constructor.
21
22
        :param configparser.SectionProxy config: The section in the config file for the target_format.
23
        """
24
        pass
25
26
    # ------------------------------------------------------------------------------------------------------------------
27
    @abc.abstractmethod
28
    def generate(self):
29
        """
30
        Starts generating HTML file.
31
        """
32
        raise NotImplementedError()
33
34
# ----------------------------------------------------------------------------------------------------------------------
35