Flake8 fixes
This commit is contained in:
parent
d4f209bfe9
commit
ae3721ce87
@ -1,15 +1,13 @@
|
|||||||
import os
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import locale
|
|
||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
from i3pystatus import IntervalModule
|
from i3pystatus import IntervalModule
|
||||||
|
|
||||||
|
|
||||||
STOPPED = 0
|
STOPPED = 0
|
||||||
RUNNING = 1
|
RUNNING = 1
|
||||||
BREAK = 2
|
BREAK = 2
|
||||||
|
|
||||||
|
|
||||||
class Pomodoro(IntervalModule):
|
class Pomodoro(IntervalModule):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -77,17 +75,16 @@ class Pomodoro(IntervalModule):
|
|||||||
text = '{:02}:{:02}'.format(int(min), int(sec))
|
text = '{:02}:{:02}'.format(int(min), int(sec))
|
||||||
sdict = {
|
sdict = {
|
||||||
'time': text,
|
'time': text,
|
||||||
'current_pomodoro': self.breaks + 1,
|
'current_pomodoro': self.breaks + 1,
|
||||||
'total_pomodoro': self.short_break_count + 1,
|
'total_pomodoro': self.short_break_count + 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
color = self.color_running if self.state == RUNNING else self.color_break
|
color = self.color_running if self.state == RUNNING else self.color_break
|
||||||
text = self.format.format(**sdict)
|
text = self.format.format(**sdict)
|
||||||
else:
|
else:
|
||||||
text = 'Start pomodoro',
|
text = 'Start pomodoro',
|
||||||
color = self.color_stopped
|
color = self.color_stopped
|
||||||
|
|
||||||
|
|
||||||
self.output = {
|
self.output = {
|
||||||
'full_text': text,
|
'full_text': text,
|
||||||
'color': color
|
'color': color
|
||||||
@ -108,4 +105,5 @@ class Pomodoro(IntervalModule):
|
|||||||
text])
|
text])
|
||||||
subprocess.Popen(['aplay',
|
subprocess.Popen(['aplay',
|
||||||
self.sound,
|
self.sound,
|
||||||
'-q'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
'-q'],
|
||||||
|
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user