Completed
Push — develop ( 8ba6e7...644415 )
by Jace
01:48
created

BasePlugin.run()   A

Complexity

Conditions 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 7
rs 9.4285
ccs 0
cts 0
cp 0
cc 1
crap 2
1
"""Base classes."""
2
3 1
from abc import ABCMeta, abstractmethod
4
5 1
from six import with_metaclass
6
7
8
class BasePlugin(with_metaclass(ABCMeta)):  # pragma: no cover (abstract class)
0 ignored issues
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...
9
    """Base class for coverage plugins."""
10
11
    @abstractmethod
12
    def match(self, cwd):
13
        """Determine if the current directory contains coverage data.
14
15
        :return bool: Indicates the current directory can be processesed.
16
17
        """
18
19
    @abstractmethod
20
    def run(self, cwd):
21
        """Extract the coverage data from the current directory.
22
23
        :return float: Percentange of lines covered.
24
25
        """
26