2020 - Sections collapsibles par catégorie (tag → phase)
2121 - Spinbox priorité + ⚠️ hors-plage
2222 - ↑ / ↓ intra-section, DnD intra-section
23- - Expert mode
2423 - Ctrl+S / Ctrl+Z / Ctrl+Y / Space / ↑↓
2524 - Format bcasl.yml : plugins en liste [{name, enabled, priority, config}]
2625"""
@@ -269,8 +268,6 @@ def __init__(
269268 "QFrame#PluginRow { background: transparent; border: none; }"
270269 )
271270
272- # ------------------------------------------------------------------
273-
274271 # ------------------------------------------------------------------
275272 # Accesseurs
276273
@@ -375,10 +372,6 @@ def _refresh_arrow_buttons(self) -> None:
375372 row .btn_up .setEnabled (i > 0 )
376373 row .btn_down .setEnabled (i < n - 1 )
377374
378- def refresh_expert (self ) -> None :
379- for row in self ._rows :
380- row .refresh_expert ()
381-
382375 def snapshot (self ) -> list [dict ]:
383376 return [r .snapshot () for r in self ._rows ]
384377
@@ -675,7 +668,12 @@ def _build_plugin_config_tabs(self) -> None:
675668 title = getattr (getattr (plugin , "meta" , None ), "name" , None ) or pid
676669 self ._tabs .addTab (widget , str (title ))
677670 self ._plugin_ui_state [pid ] = {"config" : base_cfg , "on_save" : on_save }
678- except Exception :
671+ except Exception as e :
672+ try :
673+ if hasattr (self ._gui , "log" ) and self ._gui .log :
674+ self ._gui .log .append (f"❌ Erreur build_config_tab pour { pid } : { e } \n " )
675+ except Exception :
676+ print (f"Erreur build_config_tab pour { pid } : { e } " )
679677 continue
680678
681679 # ------------------------------------------------------------------
@@ -687,15 +685,6 @@ def _install_shortcuts(self) -> None:
687685 QShortcut (QKeySequence ("Ctrl+Z" ), self , activated = self ._do_undo )
688686 QShortcut (QKeySequence ("Ctrl+Y" ), self , activated = self ._do_redo )
689687
690- # ------------------------------------------------------------------
691- # Expert mode
692- # ------------------------------------------------------------------
693-
694- def _on_expert_toggled (self , checked : bool ) -> None :
695- self ._expert [0 ] = checked
696- for section in self ._sections :
697- section .refresh_expert ()
698-
699688 # ------------------------------------------------------------------
700689 # Undo / Redo
701690 # ------------------------------------------------------------------
@@ -915,20 +904,23 @@ def on_finished(self, rep) -> None:
915904 try :
916905 if rep and hasattr (self ._gui , "log" ) and self ._gui .log is not None :
917906 self ._gui .log .append ("BCASL - Rapport:\n " )
918- for item in rep :
919- try :
920- state = (
921- "OK"
922- if getattr (item , "success" , False )
923- else f"FAIL: { getattr (item , 'error' , '' )} "
924- )
925- dur = getattr (item , "duration_ms" , 0.0 )
926- pid = getattr (item , "plugin_id" , "?" )
927- self ._gui .log .append (f" - { pid } : { state } ({ dur :.1f} ms)\n " )
928- except Exception :
929- pass
907+ # Vérifier si rep est itérable (liste de ExecutionItem)
908+ if isinstance (rep , (list , tuple )):
909+ for item in rep :
910+ try :
911+ state = (
912+ "OK"
913+ if getattr (item , "success" , False )
914+ else f"FAIL: { getattr (item , 'error' , '' )} "
915+ )
916+ dur = getattr (item , "duration_ms" , 0.0 )
917+ pid = getattr (item , "plugin_id" , "?" )
918+ self ._gui .log .append (f" - { pid } : { state } ({ dur :.1f} ms)\n " )
919+ except Exception :
920+ pass
930921 try :
931- self ._gui .log .append (rep .summary () + "\n " )
922+ if hasattr (rep , "summary" ):
923+ self ._gui .log .append (rep .summary () + "\n " )
932924 except Exception :
933925 pass
934926 try :
@@ -1009,14 +1001,16 @@ def open_bcasl_pipeline_dialog(
10091001 meta_map : "dict[str, dict[str, Any]]" ,
10101002 cfg : "dict[str, Any]" ,
10111003 plugin_instances : "dict[str, Any]" ,
1012- ) -> None :
1004+ ) -> Optional [ BcaslPipelineDialog ] :
10131005 """Ouvre le dialog BCASL Pipeline."""
10141006 dlg = BcaslPipelineDialog (gui , workspace_root , meta_map , cfg , plugin_instances )
10151007 try :
10161008 dlg .setModal (False )
10171009 dlg .show ()
1010+ return dlg
10181011 except Exception :
10191012 try :
10201013 dlg .exec ()
1014+ return dlg
10211015 except Exception :
1022- pass
1016+ return None
0 commit comments