Browse Source

Make PluginBase concrete

The abstract method really just wasn't working at all.  Since it doesn't
really hurt anything to be able to instantiate PluginBase, I just
forewent all the metaclass nonsense and made it a normal class.
Clara Hobbs 8 years ago
parent
commit
b39c303ec3
1 changed files with 2 additions and 10 deletions
  1. 2
    10
      kayleevc/plugins/pluginbase.py

+ 2
- 10
kayleevc/plugins/pluginbase.py View File

3
 # Copyright 2015-2016 Clayton G. Hobbs
3
 # Copyright 2015-2016 Clayton G. Hobbs
4
 # Portions Copyright 2013 Jezra
4
 # Portions Copyright 2013 Jezra
5
 
5
 
6
-from abc import ABCMeta, abstractmethod
7
-
8
 from gi.repository import GObject
6
 from gi.repository import GObject
9
-from gi.types import GObjectMeta
10
-
11
-
12
-class GObjectABCMeta(ABCMeta, GObjectMeta):
13
-    pass
14
 
7
 
15
 
8
 
16
-class PluginBase(GObject.Object, metaclass=GObjectABCMeta):
9
+class PluginBase(GObject.Object):
17
     """Base class for Kaylee plugins
10
     """Base class for Kaylee plugins
18
 
11
 
19
     Each Kaylee plugin module must define a subclass of this class, named
12
     Each Kaylee plugin module must define a subclass of this class, named
38
         self.name = name
31
         self.name = name
39
         self.corpus_strings = set()
32
         self.corpus_strings = set()
40
 
33
 
41
-    @abstractmethod
42
     def recognizer_finished(self, recognizer, text):
34
     def recognizer_finished(self, recognizer, text):
43
         """Process a recognized voice command
35
         """Process a recognized voice command
44
 
36
 
47
         command will be handled, this method must emit a ``processed`` signal
39
         command will be handled, this method must emit a ``processed`` signal
48
         with ``text`` as its parameter.
40
         with ``text`` as its parameter.
49
         """
41
         """
50
-        pass
42
+        return False

Loading…
Cancel
Save