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

coveragespace.BasePlugin   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 BasePlugin.match() 0 7 1
A BasePlugin.run() 0 7 1
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