mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
🎨 Format Python code with Black
This commit is contained in:
parent
22fbee7582
commit
08c0441e2d
1 changed files with 6 additions and 1 deletions
|
@ -9,7 +9,9 @@ import time
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
CATALOG_LIST_PATH = "/etc/yunohost/apps_catalog.yml"
|
CATALOG_LIST_PATH = "/etc/yunohost/apps_catalog.yml"
|
||||||
assert os.path.exists(CATALOG_LIST_PATH), f"Catalog list yaml file '{CATALOG_LIST_PATH} does not exists"
|
assert os.path.exists(
|
||||||
|
CATALOG_LIST_PATH
|
||||||
|
), f"Catalog list yaml file '{CATALOG_LIST_PATH} does not exists"
|
||||||
|
|
||||||
now = time.time()
|
now = time.time()
|
||||||
my_env = os.environ.copy()
|
my_env = os.environ.copy()
|
||||||
|
@ -61,6 +63,7 @@ def build(folder=DEFAULT_APPS_FOLDER):
|
||||||
if fail:
|
if fail:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def build_app_dict(app, infos, folder):
|
def build_app_dict(app, infos, folder):
|
||||||
app_folder = os.path.join(folder, app + "_ynh")
|
app_folder = os.path.join(folder, app + "_ynh")
|
||||||
|
|
||||||
|
@ -99,6 +102,7 @@ def build_app_dict(app, infos, folder):
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def reset():
|
def reset():
|
||||||
with open(CATALOG_LIST_PATH, "w") as f:
|
with open(CATALOG_LIST_PATH, "w") as f:
|
||||||
catalog_list = [{"id": "default", "url": "https://app.yunohost.org/default/"}]
|
catalog_list = [{"id": "default", "url": "https://app.yunohost.org/default/"}]
|
||||||
|
@ -114,6 +118,7 @@ def add():
|
||||||
with open(CATALOG_LIST_PATH, "w") as f:
|
with open(CATALOG_LIST_PATH, "w") as f:
|
||||||
yaml.safe_dump(catalog_list, f, default_flow_style=False)
|
yaml.safe_dump(catalog_list, f, default_flow_style=False)
|
||||||
|
|
||||||
|
|
||||||
def override():
|
def override():
|
||||||
with open(CATALOG_LIST_PATH, "w") as f:
|
with open(CATALOG_LIST_PATH, "w") as f:
|
||||||
catalog_list = [{"id": "custom", "url": None}]
|
catalog_list = [{"id": "custom", "url": None}]
|
||||||
|
|
Loading…
Add table
Reference in a new issue