@@ -300,7 +300,7 @@ def on_hotkey(self, event):
300300 case HotkeyAction .CAPTURE_FULL :
301301 self .screen_capture (CaptureMode .FULL )
302302 case _:
303- log .error (f "Unknown hotkey action: { event .GetId ()} " )
303+ log .error ("Unknown hotkey action: %s" , event .GetId ())
304304
305305 def toggle_visibility (self , event ):
306306 """Toggle the visibility of the main application frame. If the frame is shown, it is minimized to the system tray. If it is hidden, it is restored.
@@ -334,7 +334,7 @@ def screen_capture(
334334 screen_coordinates: Coordinates for partial screen capture (left, top, width, height). Defaults to None.
335335 name: Custom name for the captured image. If not provided, a timestamp-based name is generated.
336336 """
337- log .debug (f "Capturing { capture_mode . value } screen" )
337+ log .debug ("Capturing %s screen" , capture_mode . value )
338338 conv_tab = self .current_tab
339339 if not conv_tab :
340340 wx .MessageBox (
@@ -354,7 +354,7 @@ def screen_capture(
354354 conv_tab .conv_storage_path / f"attachments/{ capture_name } "
355355 )
356356 name = name or capture_name
357- log .debug (f "Capture file URL: { capture_path } " )
357+ log .debug ("Capture file URL: %s" , capture_path )
358358 thread = ScreenCaptureThread (
359359 self ,
360360 capture_path ,
@@ -435,7 +435,7 @@ def on_quit(self, event: wx.Event | None):
435435 if tab .task :
436436 task_id = tab .task .ident
437437 log .debug (
438- f "Waiting for conversation task { task_id } to finish..."
438+ "Waiting for conversation task %s to finish..." , task_id
439439 )
440440 tab .task .join ()
441441 log .debug ("... is dead" )
@@ -486,7 +486,8 @@ def on_new_default_conversation(self, event: wx.Event | None):
486486 profile = config .conversation_profiles ().default_profile
487487 if profile :
488488 log .info (
489- f"Creating a new conversation with default profile ({ profile .name } )"
489+ "Creating a new conversation with default profile (%s)" ,
490+ profile .name ,
490491 )
491492 self .new_conversation (profile )
492493
@@ -523,7 +524,7 @@ def on_new_conversation(self, event: wx.Event):
523524 profile = self .get_selected_profile_from_menu (event )
524525 if not profile :
525526 return
526- log .info (f "Creating a new conversation with profile: { profile .name } " )
527+ log .info ("Creating a new conversation with profile: %s" , profile .name )
527528 self .new_conversation (profile )
528529
529530 def refresh_tab_title (self , include_frame : bool = False ):
@@ -780,7 +781,7 @@ def on_install_nvda_addon(self, event):
780781 tmp_nvda_addon_path = os .path .join (
781782 tempfile .gettempdir (), "basiliskllm.nvda-addon"
782783 )
783- log .debug (f "Creating NVDA addon: { tmp_nvda_addon_path } " )
784+ log .debug ("Creating NVDA addon: %s" , tmp_nvda_addon_path )
784785 with zipfile .ZipFile (
785786 tmp_nvda_addon_path , 'w' , zipfile .ZIP_DEFLATED
786787 ) as zipf :
@@ -794,7 +795,7 @@ def on_install_nvda_addon(self, event):
794795 log .debug ("NVDA addon created" )
795796 os .startfile (tmp_nvda_addon_path )
796797 except Exception as e :
797- log .error (f "Failed to create NVDA addon: { e } " )
798+ log .error ("Failed to create NVDA addon: %s" , e )
798799 wx .MessageBox (
799800 _ ("Failed to create NVDA addon" ),
800801 _ ("Error" ),
@@ -847,7 +848,7 @@ def on_view_log(self, event: wx.Event | None):
847848 try :
848849 os .startfile (get_log_file_path ())
849850 except Exception as e :
850- log .error (f "Failed to open log file: { e } " )
851+ log .error ("Failed to open log file: %s" , e )
851852 wx .MessageBox (
852853 _ ("Failed to open log file" ), _ ("Error" ), wx .OK | wx .ICON_ERROR
853854 )
@@ -884,7 +885,7 @@ def show_dialog():
884885 parent = self , title = _ ("New version available" ), updater = updater
885886 )
886887 update_dialog .ShowModal ()
887- log .debug (f "Update dialog shown: { update_dialog .IsShown ()} " )
888+ log .debug ("Update dialog shown: %s" , update_dialog .IsShown ())
888889
889890 wx .CallAfter (show_dialog )
890891
@@ -901,7 +902,7 @@ def show_dialog():
901902 parent = self , title = _ ("Downloading update" ), updater = updater
902903 )
903904 download_dialog .ShowModal ()
904- log .debug (f "Download dialog shown: { download_dialog .IsShown ()} " )
905+ log .debug ("Download dialog shown: %s" , download_dialog .IsShown ())
905906
906907 wx .CallAfter (show_dialog )
907908
@@ -1005,7 +1006,7 @@ def on_apply_conversation_profile(self, event: wx.Event):
10051006 profile = self .get_selected_profile_from_menu (event )
10061007 if not profile :
10071008 return
1008- log .info (f "Applying profile: { profile . name } to conversation" )
1009+ log .info ("Applying profile: %s to conversation" , profile . name )
10091010 self .current_tab .apply_profile (profile )
10101011
10111012 def handle_no_account_configured (self ):
@@ -1104,7 +1105,9 @@ def open_conversation(self, file_path: str):
11041105 style = wx .OK | wx .ICON_ERROR ,
11051106 )
11061107 log .error (
1107- f"Failed to open conversation file: { file_path } , error: { e } " ,
1108+ "Failed to open conversation file: %s, error: %s" ,
1109+ file_path ,
1110+ e ,
11081111 exc_info = e ,
11091112 )
11101113
0 commit comments