2727class Settings :
2828 def __init__ (self , config_section ):
2929 # Time without input before we're considering the user as AFK
30- self .timeout = config_section . getfloat ( "timeout" )
30+ self .timeout = config_section [ "timeout" ]
3131 # How often we should poll for input activity
32- self .poll_time = config_section . getfloat ( "poll_time" )
32+ self .poll_time = config_section [ "poll_time" ]
3333
3434 assert self .timeout >= self .poll_time
3535
@@ -41,7 +41,9 @@ def __init__(self, testing=False):
4141 self .settings = Settings (watcher_config [configsection ])
4242
4343 self .client = ActivityWatchClient ("aw-watcher-afk" , testing = testing )
44- self .bucketname = "{}_{}" .format (self .client .client_name , self .client .client_hostname )
44+ self .bucketname = "{}_{}" .format (
45+ self .client .client_name , self .client .client_hostname
46+ )
4547
4648 def ping (self , afk : bool , timestamp : datetime , duration : float = 0 ):
4749 data = {"status" : "afk" if afk else "not-afk" }
@@ -93,7 +95,9 @@ def heartbeat_loop(self):
9395 # Send a heartbeat if no state change was made
9496 else :
9597 if afk :
96- self .ping (afk , timestamp = last_input , duration = seconds_since_input )
98+ self .ping (
99+ afk , timestamp = last_input , duration = seconds_since_input
100+ )
97101 else :
98102 self .ping (afk , timestamp = last_input )
99103
0 commit comments