@@ -200,30 +200,53 @@ def _apply_tab_text(obj: Any, key: str, default: str | None = None) -> None:
200200 chosen_key = "type_label"
201201 elif name == "console_label" :
202202 chosen_key = "console_label"
203- elif name in {"windowed_checkbox" , "disable_console_checkbox" , "debug_checkbox" , "verbose_checkbox" , "onefile_checkbox" , "standalone_checkbox" }:
203+ elif name in {
204+ "windowed_checkbox" ,
205+ "disable_console_checkbox" ,
206+ "debug_checkbox" ,
207+ "verbose_checkbox" ,
208+ "onefile_checkbox" ,
209+ "standalone_checkbox" ,
210+ }:
204211 chosen_key = name
205212
206- if system_key and system_attr and _is_system_value (getattr (root , str (system_attr ), None )):
213+ if (
214+ system_key
215+ and system_attr
216+ and _is_system_value (getattr (root , str (system_attr ), None ))
217+ ):
207218 chosen_key = str (system_key )
208219
209220 if format_attr :
210221 ctx = getattr (root , str (format_attr ), None )
211222 if ctx :
212- value = translate (engine_id , chosen_key , current if isinstance (current , str ) else None )
223+ value = translate (
224+ engine_id ,
225+ chosen_key ,
226+ current if isinstance (current , str ) else None ,
227+ )
213228 if isinstance (value , str ) and value :
214229 obj .setText (value .replace ("{path}" , str (ctx )))
215230 elif none_key :
216- _apply_text (obj , str (none_key ), current if isinstance (current , str ) else None )
231+ _apply_text (
232+ obj ,
233+ str (none_key ),
234+ current if isinstance (current , str ) else None ,
235+ )
217236 continue
218237
219238 _apply_text (obj , chosen_key , current if isinstance (current , str ) else None )
220239
221240 tooltip_key = _prop (obj , "i18n_tooltip_key" ) or _tooltip_for_name (name )
222241 if tooltip_key :
223242 current = obj .toolTip () if hasattr (obj , "toolTip" ) else None
224- _apply_tooltip (obj , str (tooltip_key ), current if isinstance (current , str ) else None )
243+ _apply_tooltip (
244+ obj , str (tooltip_key ), current if isinstance (current , str ) else None
245+ )
225246
226- placeholder_key = _prop (obj , "i18n_placeholder_key" ) or _placeholder_for_name (name )
247+ placeholder_key = _prop (obj , "i18n_placeholder_key" ) or _placeholder_for_name (
248+ name
249+ )
227250 if placeholder_key :
228251 current = obj .placeholderText () if hasattr (obj , "placeholderText" ) else None
229252 _apply_placeholder (
@@ -233,7 +256,9 @@ def _apply_tab_text(obj: Any, key: str, default: str | None = None) -> None:
233256 tab_key = _prop (obj , "i18n_tab_key" )
234257 if tab_key :
235258 current = obj .text () if hasattr (obj , "text" ) else None
236- _apply_tab_text (obj , str (tab_key ), current if isinstance (current , str ) else None )
259+ _apply_tab_text (
260+ obj , str (tab_key ), current if isinstance (current , str ) else None
261+ )
237262
238263
239264def _refresh_live_engine_widgets (gui ) -> None :
@@ -698,6 +723,7 @@ def load_engine_language_file(engine_package: str, code: str) -> dict:
698723 """
699724 try :
700725 import importlib .resources as ilr
726+
701727 try :
702728 import yaml
703729 except ImportError : # pragma: no cover - PyYAML attendu dans le projet
0 commit comments