Make length into a function to keep pylint happy
@@ -4,6 +4,12 @@ import board
import audioio
import shapes
+
+def length(frequency):
+ return int(64000 / frequency)
+
+
+
class Generator:
sample = None
@@ -16,10 +22,6 @@ class Generator:
self.dac = audioio.AudioOut(board.A0)
- def length(self, frequency):
- return int(64000 / frequency)
-
-
def reallocate(self, frequency):
self.sample = array.array("h", [0] * self.length(frequency))
