Failed Conditions
Pull Request — master (#2076)
by Abdeali
02:11
created

coalib/bears/GlobalBear.py (8 issues)

1
from coalib.bears.Bear import Bear
2
from coalib.bears.BEAR_KIND import BEAR_KIND
3
4
5
class GlobalBear(Bear):
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable Bear does not seem to be defined.
Loading history...
6
    """
7
    A GlobalBear is able to analyze semantic facts across several file.
8
9
    The results of a GlobalBear will be presented grouped by the origin Bear.
10
    Therefore Results spanning above multiple files are allowed and will be
11
    handled right.
12
13
    If you only look at one file at once anyway a LocalBear is better for your
14
    needs. (And better for performance and usability for both user and
15
    developer.)
16
    """
17
18
    def __init__(self,
19
                 file_dict,  # filename : file contents
20
                 section,
21
                 message_queue,
22
                 timeout=0):
23
        Bear.__init__(self, section, message_queue, timeout)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable section does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable timeout does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable message_queue does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable self does not seem to be defined.
Loading history...
24
        self.file_dict = file_dict
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable file_dict does not seem to be defined.
Loading history...
25
26
    @staticmethod
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable staticmethod does not seem to be defined.
Loading history...
27
    def kind():
28
        return BEAR_KIND.GLOBAL
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable BEAR_KIND does not seem to be defined.
Loading history...
29
30
    def run(self,
31
            *args,
32
            dependency_results=None,
33
            **kwargs):
34
        """
35
        Handles all files in file_dict.
36
37
        :return: A list of Result type.
38
        """
39
        raise NotImplementedError(
40
            "This function has to be implemented for a runnable bear.")
41