mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1430 from YunoHost/ci-format-dev
[CI] Format code with Black
This commit is contained in:
commit
83dfc0590d
4 changed files with 8 additions and 4 deletions
|
@ -18,7 +18,7 @@ class MyDiagnoser(Diagnoser):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
MB = 1024 ** 2
|
MB = 1024**2
|
||||||
GB = MB * 1024
|
GB = MB * 1024
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -293,7 +293,7 @@ class MyMigration(Migration):
|
||||||
raise YunohostError("migration_0021_not_buster")
|
raise YunohostError("migration_0021_not_buster")
|
||||||
|
|
||||||
# Have > 1 Go free space on /var/ ?
|
# Have > 1 Go free space on /var/ ?
|
||||||
if free_space_in_directory("/var/") / (1024 ** 3) < 1.0:
|
if free_space_in_directory("/var/") / (1024**3) < 1.0:
|
||||||
raise YunohostError("migration_0021_not_enough_free_space")
|
raise YunohostError("migration_0021_not_enough_free_space")
|
||||||
|
|
||||||
# Check system is up to date
|
# Check system is up to date
|
||||||
|
|
|
@ -226,7 +226,7 @@ def tools_postinstall(
|
||||||
main_space = sum(
|
main_space = sum(
|
||||||
psutil.disk_usage(d.mountpoint).total for d in main_disk_partitions
|
psutil.disk_usage(d.mountpoint).total for d in main_disk_partitions
|
||||||
)
|
)
|
||||||
GB = 1024 ** 3
|
GB = 1024**3
|
||||||
if not force_diskspace and main_space < 10 * GB:
|
if not force_diskspace and main_space < 10 * GB:
|
||||||
raise YunohostValidationError("postinstall_low_rootfsspace")
|
raise YunohostValidationError("postinstall_low_rootfsspace")
|
||||||
|
|
||||||
|
|
|
@ -1144,7 +1144,11 @@ class AppQuestion(Question):
|
||||||
apps = app_list(full=True)["apps"]
|
apps = app_list(full=True)["apps"]
|
||||||
|
|
||||||
if self.filter:
|
if self.filter:
|
||||||
apps = [app for app in apps if evaluate_simple_js_expression(self.filter, context=app)]
|
apps = [
|
||||||
|
app
|
||||||
|
for app in apps
|
||||||
|
if evaluate_simple_js_expression(self.filter, context=app)
|
||||||
|
]
|
||||||
|
|
||||||
def _app_display(app):
|
def _app_display(app):
|
||||||
domain_path_or_id = f" ({app.get('domain_path', app['id'])})"
|
domain_path_or_id = f" ({app.get('domain_path', app['id'])})"
|
||||||
|
|
Loading…
Add table
Reference in a new issue