Completed
Push — master ( 57e7bf...8a74a7 )
by P.R.
01:36
created

sdoc.format.Format   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %
Metric Value
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Format.__init__() 0 7 1
A Format.generate() 0 3 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):
0 ignored issues
show
Coding Style introduced by
This method 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...
29
        pass
30
31
# ----------------------------------------------------------------------------------------------------------------------
32