File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2121import typing
2222
2323from safeeyes import utility
24- from safeeyes .model import State
24+ from safeeyes .model import BreakType , State
2525
2626if typing .TYPE_CHECKING :
2727 from safeeyes .safeeyes import SafeEyes
@@ -60,8 +60,8 @@ def status(self) -> str:
6060 def quit (self ) -> None :
6161 utility .execute_main_thread (self ._application .quit )
6262
63- def take_break (self , break_type = None ) -> None :
64- self ._application .take_break ( break_type )
63+ def take_break (self , break_type : typing . Optional [ BreakType ] = None ) -> None :
64+ utility . execute_main_thread ( self ._application .take_break , break_type )
6565
6666 def has_breaks (self , break_type = None ) -> bool :
6767 return self ._application .safe_eyes_core .has_breaks (break_type )
Original file line number Diff line number Diff line change 3030from safeeyes .ui .about_dialog import AboutDialog
3131from safeeyes .ui .break_screen import BreakScreen
3232from safeeyes .ui .required_plugin_dialog import RequiredPluginDialog
33- from safeeyes .model import State , RequiredPluginException
33+ from safeeyes .model import BreakType , State , RequiredPluginException
3434from safeeyes .translations import translate as _
3535from safeeyes .plugin_manager import PluginManager
3636from safeeyes .core import SafeEyesCore
@@ -536,9 +536,9 @@ def stop_break(self):
536536 self .plugins_manager .stop_break ()
537537 return True
538538
539- def take_break (self , break_type = None ):
539+ def take_break (self , break_type : typing . Optional [ BreakType ] = None ) -> None :
540540 """Take a break now."""
541- utility . execute_main_thread ( self .safe_eyes_core .take_break , break_type )
541+ self .safe_eyes_core .take_break ( break_type )
542542
543543 def status (self ):
544544 """Return the status of Safe Eyes."""
You can’t perform that action at this time.
0 commit comments