GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 5cb0ac...773912 )
by P.R.
02:12
created

EventActor   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 25
ccs 8
cts 8
cp 1
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 9 1
A destroy() 0 9 2
1 1
from enarksh.event.Event import Event
0 ignored issues
show
Coding Style introduced by
This module 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...
2
3
4 1
class EventActor:
5
    """
6
    Parent class for classes that fire events and for classes that listen for events.
7
    """
8
    # ------------------------------------------------------------------------------------------------------------------
9 1
    def __init__(self):
10 1
        self.friend_registered_events = set()
11 1
        """
12
        All the (active) events this object can fire.
13
14
        Note: This field MUST be touched by the event controller only.
15
16
        :type: set[enarksh.event.Event.Event]
17
        """
18
19
    # ------------------------------------------------------------------------------------------------------------------
20 1
    def destroy(self):
21
        """
22
        Removes this object from the event system. This as preparation for removing this object such that there aren't
23
        references (from the event system) to this object and the garbage collector can remove this object.
24
        """
25 1
        for event in self.friend_registered_events:
26 1
            event.destroy()
27
28 1
        Event.event_controller.friend_unregister_listener_object(self)
29
30
# ----------------------------------------------------------------------------------------------------------------------
31