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

Loading…
Cancel
Save