Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
pomponchik committed Mar 31, 2024
1 parent 5d1e99d commit d1cd613
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions metronomes/metronome.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@ def stop(self) -> None:
raise StopStoppedMetronomeError("You've already stopped this metronome, it's impossible to do it twice.")

self.token.cancel()

if not self.same_thread:
self.thread.join()
self.thread.join()

self.stopped = True
self.logger.info('The metronome has stopped.')

def run_loop(self):
def run_loop(self) -> None:
arguments = [...] if self.suppress_exceptions else []

while self.token:
Expand Down

0 comments on commit d1cd613

Please sign in to comment.