From 8859038a41b94700bd071689eabb88d05a438c72 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 10 Jan 2023 01:30:51 +0000 Subject: [PATCH] [CI] Format code with Black --- src/app.py | 11 +++++++++-- src/tools.py | 2 +- src/utils/config.py | 4 +++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/app.py b/src/app.py index 7458808fc..5b2e63e44 100644 --- a/src/app.py +++ b/src/app.py @@ -1595,7 +1595,13 @@ def app_ssowatconf(): } redirected_urls = {} - apps_using_remote_user_var_in_nginx = check_output('grep -nri \'$remote_user\' /etc/yunohost/apps/*/conf/*nginx*conf | awk -F/ \'{print $5}\' || true').strip().split("\n") + apps_using_remote_user_var_in_nginx = ( + check_output( + "grep -nri '$remote_user' /etc/yunohost/apps/*/conf/*nginx*conf | awk -F/ '{print $5}' || true" + ) + .strip() + .split("\n") + ) for app in _installed_apps(): @@ -1638,7 +1644,8 @@ def app_ssowatconf(): app_id = perm_name.split(".")[0] permissions[perm_name] = { - "use_remote_user_var_in_nginx_conf": app_id in apps_using_remote_user_var_in_nginx, + "use_remote_user_var_in_nginx_conf": app_id + in apps_using_remote_user_var_in_nginx, "users": perm_info["corresponding_users"], "label": perm_info["label"], "show_tile": perm_info["show_tile"] diff --git a/src/tools.py b/src/tools.py index 5c5b8077b..eb385f4a8 100644 --- a/src/tools.py +++ b/src/tools.py @@ -417,7 +417,7 @@ def tools_upgrade(operation_logger, target=None): if target not in ["apps", "system"]: raise YunohostValidationError( "Uhoh ?! tools_upgrade should have 'apps' or 'system' value for argument target", - raw_msg=True + raw_msg=True, ) # diff --git a/src/utils/config.py b/src/utils/config.py index da3c68ad8..bd3a6b6a9 100644 --- a/src/utils/config.py +++ b/src/utils/config.py @@ -479,7 +479,9 @@ class ConfigPanel: # Check TOML config panel is in a supported version if float(toml_config_panel["version"]) < CONFIG_PANEL_VERSION_SUPPORTED: - logger.error(f"Config panels version {toml_config_panel['version']} are not supported") + logger.error( + f"Config panels version {toml_config_panel['version']} are not supported" + ) return None # Transform toml format into internal format