diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-27 02:01:51 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-27 02:01:51 +0200 |
commit | 6c42e32d98aa2e04d446f31b8e667a280acf4b54 (patch) | |
tree | d372a86713857dd3c8f8c99ad2256da51048fad9 | |
parent | 343822904ee26955e622e325539c64aee1c2112e (diff) | |
download | MusicSampler-6c42e32d98aa2e04d446f31b8e667a280acf4b54.tar.gz MusicSampler-6c42e32d98aa2e04d446f31b8e667a280acf4b54.tar.zst MusicSampler-6c42e32d98aa2e04d446f31b8e667a280acf4b54.zip |
Coding styles
-rw-r--r-- | helpers/action.py | 3 | ||||
-rw-r--r-- | helpers/actions/wait.py | 4 | ||||
-rw-r--r-- | helpers/key.py | 4 | ||||
-rw-r--r-- | helpers/mapping.py | 3 |
4 files changed, 9 insertions, 5 deletions
diff --git a/helpers/action.py b/helpers/action.py index 1f374ec..6ac47b1 100644 --- a/helpers/action.py +++ b/helpers/action.py | |||
@@ -72,7 +72,8 @@ class Action: | |||
72 | def on_enter_loading(self): | 72 | def on_enter_loading(self): |
73 | if hasattr(actions, self.action): | 73 | if hasattr(actions, self.action): |
74 | if 'music' in self.arguments: | 74 | if 'music' in self.arguments: |
75 | self.arguments['music'].subscribe_loaded(self.callback_music_loaded) | 75 | self.arguments['music'].subscribe_loaded( |
76 | self.callback_music_loaded) | ||
76 | else: | 77 | else: |
77 | self.success() | 78 | self.success() |
78 | else: | 79 | else: |
diff --git a/helpers/actions/wait.py b/helpers/actions/wait.py index f7d2a78..ea42408 100644 --- a/helpers/actions/wait.py +++ b/helpers/actions/wait.py | |||
@@ -5,7 +5,9 @@ def run(action, duration=0, music=None, set_wait_id=None, **kwargs): | |||
5 | action.mapping.add_wait_id(set_wait_id, action) | 5 | action.mapping.add_wait_id(set_wait_id, action) |
6 | 6 | ||
7 | action.sleep_event = threading.Event() | 7 | action.sleep_event = threading.Event() |
8 | action.sleep_event_timer = threading.Timer(duration, action.sleep_event.set) | 8 | action.sleep_event_timer = threading.Timer( |
9 | duration, | ||
10 | action.sleep_event.set) | ||
9 | 11 | ||
10 | if music is not None: | 12 | if music is not None: |
11 | music.wait_end() | 13 | music.wait_end() |
diff --git a/helpers/key.py b/helpers/key.py index 3c98ce7..2f94153 100644 --- a/helpers/key.py +++ b/helpers/key.py | |||
@@ -85,8 +85,8 @@ class Key(ButtonBehavior, Widget): | |||
85 | 'source': 'loaded', | 85 | 'source': 'loaded', |
86 | 'dest': 'loaded_running', | 86 | 'dest': 'loaded_running', |
87 | 'after': ['run_actions', 'finish'], | 87 | 'after': ['run_actions', 'finish'], |
88 | # if a child, like loaded_no_actions, has no transitions, then it is | 88 | # if a child, like loaded_no_actions, has no transitions, then it |
89 | # bubbled to the parent, and we don't want that. | 89 | # is bubbled to the parent, and we don't want that. |
90 | 'conditions': ['is_loaded'] | 90 | 'conditions': ['is_loaded'] |
91 | }, | 91 | }, |
92 | { | 92 | { |
diff --git a/helpers/mapping.py b/helpers/mapping.py index 1256696..dbc1a81 100644 --- a/helpers/mapping.py +++ b/helpers/mapping.py | |||
@@ -375,7 +375,8 @@ class Mapping(RelativeLayout): | |||
375 | self.open_files[filename]\ | 375 | self.open_files[filename]\ |
376 | .reload_properties(**music_property) | 376 | .reload_properties(**music_property) |
377 | 377 | ||
378 | seen_files[filename] = self.open_files[filename] | 378 | seen_files[filename] =\ |
379 | self.open_files[filename] | ||
379 | else: | 380 | else: |
380 | seen_files[filename] = MusicFile( | 381 | seen_files[filename] = MusicFile( |
381 | filename, self, **music_property) | 382 | filename, self, **music_property) |