Merge pull request #1563 from YunoHost/ci-format-dev

[CI] Format code with Black
This commit is contained in:
Alexandre Aubin 2023-01-10 14:40:07 +01:00 committed by GitHub
commit 2b6465d36d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

View file

@ -1595,7 +1595,13 @@ def app_ssowatconf():
} }
redirected_urls = {} 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(): for app in _installed_apps():
@ -1638,7 +1644,8 @@ def app_ssowatconf():
app_id = perm_name.split(".")[0] app_id = perm_name.split(".")[0]
permissions[perm_name] = { 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"], "users": perm_info["corresponding_users"],
"label": perm_info["label"], "label": perm_info["label"],
"show_tile": perm_info["show_tile"] "show_tile": perm_info["show_tile"]

View file

@ -417,7 +417,7 @@ def tools_upgrade(operation_logger, target=None):
if target not in ["apps", "system"]: if target not in ["apps", "system"]:
raise YunohostValidationError( raise YunohostValidationError(
"Uhoh ?! tools_upgrade should have 'apps' or 'system' value for argument target", "Uhoh ?! tools_upgrade should have 'apps' or 'system' value for argument target",
raw_msg=True raw_msg=True,
) )
# #

View file

@ -479,7 +479,9 @@ class ConfigPanel:
# Check TOML config panel is in a supported version # Check TOML config panel is in a supported version
if float(toml_config_panel["version"]) < CONFIG_PANEL_VERSION_SUPPORTED: 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 return None
# Transform toml format into internal format # Transform toml format into internal format