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

[CI] Format code with Black
This commit is contained in:
Alexandre Aubin 2022-03-08 13:17:07 +01:00 committed by GitHub
commit d11f32141e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View file

@ -147,7 +147,7 @@ def app_info(app, full=False, upgradable=False):
absolute_app_name, _ = _parse_app_instance_name(app) absolute_app_name, _ = _parse_app_instance_name(app)
from_catalog = _load_apps_catalog()["apps"].get(absolute_app_name, {}) from_catalog = _load_apps_catalog()["apps"].get(absolute_app_name, {})
ret["upgradable"] = _app_upgradable({** ret, "from_catalog": from_catalog}) ret["upgradable"] = _app_upgradable({**ret, "from_catalog": from_catalog})
if ret["upgradable"] == "yes": if ret["upgradable"] == "yes":
ret["current_version"] = ret.get("version", "?") ret["current_version"] = ret.get("version", "?")

View file

@ -140,7 +140,9 @@ def regen_conf(
# though kinda tight-coupled to the postinstall logic :s # though kinda tight-coupled to the postinstall logic :s
if os.path.exists("/etc/yunohost/installed"): if os.path.exists("/etc/yunohost/installed"):
env["YNH_DOMAINS"] = " ".join(domain_list()["domains"]) env["YNH_DOMAINS"] = " ".join(domain_list()["domains"])
env["YNH_MAIN_DOMAINS"] = " ".join(domain_list(exclude_subdomains=True)["domains"]) env["YNH_MAIN_DOMAINS"] = " ".join(
domain_list(exclude_subdomains=True)["domains"]
)
pre_result = hook_callback("conf_regen", names, pre_callback=_pre_call, env=env) pre_result = hook_callback("conf_regen", names, pre_callback=_pre_call, env=env)

View file

@ -36,10 +36,7 @@ from moulinette.utils.log import getActionLogger
from moulinette.utils.process import call_async_output from moulinette.utils.process import call_async_output
from moulinette.utils.filesystem import read_yaml, write_to_yaml, cp, mkdir, rm from moulinette.utils.filesystem import read_yaml, write_to_yaml, cp, mkdir, rm
from yunohost.app import ( from yunohost.app import app_upgrade, app_list
app_upgrade,
app_list
)
from yunohost.app_catalog import ( from yunohost.app_catalog import (
_initialize_apps_catalog_system, _initialize_apps_catalog_system,
_update_apps_catalog, _update_apps_catalog,