Rework Plugin.commands() to include _setup_commands().
[hooke.git] / hooke / plugin / curve.py
index af427d6734ddcc65411eed43089728533b0ed4c1..27fb0cd9fbdc4b7a862ffc5856e1416e7f9ba9eb 100644 (file)
@@ -35,11 +35,11 @@ from ..util.fft import unitary_avg_power_spectrum
 class CurvePlugin (Builtin):
     def __init__(self):
         super(CurvePlugin, self).__init__(name='curve')
-
-    def commands(self):
-        return [InfoCommand(), ExportCommand(),
-                DifferenceCommand(), DerivativeCommand(),
-                PowerSpectrumCommand()]
+        self._commands = [
+            InfoCommand(), ExportCommand(),
+            DifferenceCommand(), DerivativeCommand(),
+            PowerSpectrumCommand()]
+        self._setup_commands()
 
 
 # Define common or complicated arguments