From 9517b26c630f48d741077973fdb1f759b13e573f Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:11:57 +0000 Subject: [PATCH] :art: Format Python code with Black --- src/app.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app.py b/src/app.py index 903e573b9..24b78fb37 100644 --- a/src/app.py +++ b/src/app.py @@ -2007,7 +2007,6 @@ ynh_app_config_run $1 app_script_env.update(env) env = app_script_env - ret, values = hook_exec(config_script, args=[action], env=env) if ret != 0: if action == "show": @@ -2037,9 +2036,9 @@ ynh_app_config_run $1 for panel, section, option in self._iterate(): - bind_panel = panel.get('bind') + bind_panel = panel.get("bind") - bind_section = section.get('bind') + bind_section = section.get("bind") if not bind_section: bind_section = bind_panel elif bind_section[-1] == ":" and bind_panel and ":" in bind_panel: @@ -2049,28 +2048,30 @@ ynh_app_config_run $1 else: bind_section = selector + bind_section + bind_panel_file - bind = option.get('bind') + bind = option.get("bind") if not bind: if bind_section: bind = bind_section else: - bind = 'settings' + bind = "settings" elif bind[-1] == ":" and bind_section and ":" in bind_section: selector, bind_file = bind_section.split(":") if ">" in bind: bind = bind + bind_file else: bind = selector + bind + bind_file - if bind == "settings" and option.get('type', 'string') == 'file': - bind = 'null' + if bind == "settings" and option.get("type", "string") == "file": + bind = "null" option["bind"] = _hydrate_app_template(bind, settings) def _dump_options_types_and_binds(self): lines = [] for _, _, option in self._iterate(): - lines.append('|'.join([option['id'], option.get('type', 'string'), option["bind"]])) - return '\n'.join(lines) + lines.append( + "|".join([option["id"], option.get("type", "string"), option["bind"]]) + ) + return "\n".join(lines) app_settings_cache: Dict[str, Dict[str, Any]] = {}