aboutsummaryrefslogtreecommitdiff
path: root/helpers/key.py
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-07-18 00:15:15 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-07-18 19:50:48 +0200
commit2e4049036ec4d90a9daeff606d821d2ac2d023ce (patch)
tree214eb998546a0a7af02c6efbe3bd64c2f297cbd3 /helpers/key.py
parentccda4cb91686d4c2b70f0c26d21c26ac3d03c3b9 (diff)
downloadMusicSampler-2e4049036ec4d90a9daeff606d821d2ac2d023ce.tar.gz
MusicSampler-2e4049036ec4d90a9daeff606d821d2ac2d023ce.tar.zst
MusicSampler-2e4049036ec4d90a9daeff606d821d2ac2d023ce.zip
Coding styles
Diffstat (limited to 'helpers/key.py')
-rw-r--r--helpers/key.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/helpers/key.py b/helpers/key.py
index fe82d5b..34c5140 100644
--- a/helpers/key.py
+++ b/helpers/key.py
@@ -1,5 +1,6 @@
1from kivy.uix.widget import Widget 1from kivy.uix.widget import Widget
2from kivy.properties import AliasProperty, BooleanProperty, ListProperty, StringProperty 2from kivy.properties import AliasProperty, BooleanProperty, \
3 ListProperty, StringProperty
3from kivy.clock import Clock 4from kivy.clock import Clock
4from kivy.uix.behaviors import ButtonBehavior 5from kivy.uix.behaviors import ButtonBehavior
5 6
@@ -56,7 +57,7 @@ class Key(ButtonBehavior, Widget):
56 def set_description(self, description): 57 def set_description(self, description):
57 if description[0] is not None: 58 if description[0] is not None:
58 self.description_title = str(description[0]) 59 self.description_title = str(description[0])
59 for desc in description[1:]: 60 for desc in description[1 :]:
60 if desc is None: 61 if desc is None:
61 self.description.append("") 62 self.description.append("")
62 else: 63 else:
@@ -94,16 +95,15 @@ class Key(ButtonBehavior, Widget):
94 action_number = 0 95 action_number = 0
95 for self.current_action in self.actions: 96 for self.current_action in self.actions:
96 if self.parent.keep_running(self, start_time): 97 if self.parent.keep_running(self, start_time):
97 self.list_actions(action_number = action_number + 0.5) 98 self.list_actions(action_number=action_number + 0.5)
98 self.current_action.run() 99 self.current_action.run()
99 action_number += 1 100 action_number += 1
100 self.list_actions(action_number = action_number) 101 self.list_actions(action_number=action_number)
101 102
102 self.parent.finished_running(self, start_time) 103 self.parent.finished_running(self, start_time)
103 104
104 def list_actions(self, action_number = 0): 105 def list_actions(self, action_number=0):
105 self.parent.parent.ids['ActionList'].update_list(self, action_number) 106 self.parent.parent.ids['ActionList'].update_list(self, action_number)
106 107
107 def on_press(self): 108 def on_press(self):
108 self.list_actions() 109 self.list_actions()
109 pass