Skip to content

Commit

Permalink
🎨 Format Python code with Black (#2275)
Browse files Browse the repository at this point in the history
Co-authored-by: alexAubin <[email protected]>
  • Loading branch information
github-actions[bot] and alexAubin authored Apr 30, 2024
1 parent 8266390 commit 5f7bef0
Showing 1 changed file with 20 additions and 28 deletions.
48 changes: 20 additions & 28 deletions tools/app_generator/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ class GeneralInfos(FlaskForm):

app_name = StringField(
_("App name"),
description=_(
"It's the application name, displayed in the user interface"
),
description=_("It's the application name, displayed in the user interface"),
validators=[DataRequired()],
render_kw={
"placeholder": "My super App",
Expand Down Expand Up @@ -180,16 +178,12 @@ class IntegrationInfos(FlaskForm):

maintainers = StringField(
_("Maintainer of the generated app"),
description=_(
"Usually you put your name here... If you're okay with it ;)"
),
description=_("Usually you put your name here... If you're okay with it ;)"),
)

yunohost_required_version = StringField(
_("Minimal YunoHost version"),
description=_(
"Minimal YunoHost version for the application to work"
),
description=_("Minimal YunoHost version for the application to work"),
render_kw={
"placeholder": "11.1.21",
},
Expand Down Expand Up @@ -391,9 +385,7 @@ class Ressources(FlaskForm):
)

apt_dependencies = StringField(
_(
"Dependencies to be installed via apt (separated by comma and/or spaces)"
),
_("Dependencies to be installed via apt (separated by comma and/or spaces)"),
render_kw={
"placeholder": "foo, bar2.1-ext, libwat",
},
Expand Down Expand Up @@ -458,9 +450,7 @@ class SpecificTechnology(FlaskForm):

use_composer = BooleanField(
_("Use composer"),
description=_(
"Composer is a PHP dependencies manager used by some apps"
),
description=_("Composer is a PHP dependencies manager used by some apps"),
default=False,
)

Expand Down Expand Up @@ -498,9 +488,7 @@ class AppConfig(FlaskForm):

use_custom_config_file = BooleanField(
_("The app uses a specific configuration file"),
description=_(
"Usually : .env, config.json, conf.ini, params.yml, ..."
),
description=_("Usually : .env, config.json, conf.ini, params.yml, ..."),
default=False,
)

Expand Down Expand Up @@ -536,31 +524,39 @@ class Documentation(FlaskForm):
},
)
pre_install = TextAreaField(
_("doc/PRE_INSTALL.md: important info to be shown to the admin before installing the app"),
_(
"doc/PRE_INSTALL.md: important info to be shown to the admin before installing the app"
),
description=_("Leave empty if not relevant"),
validators=[Optional()],
render_kw={
"spellcheck": "false",
},
)
post_install = TextAreaField(
_("doc/POST_INSTALL.md: important info to be shown to the admin after installing the app"),
_(
"doc/POST_INSTALL.md: important info to be shown to the admin after installing the app"
),
description=_("Leave empty if not relevant"),
validators=[Optional()],
render_kw={
"spellcheck": "false",
},
)
pre_upgrade = TextAreaField(
_("doc/PRE_UPGRADE.md: important info to be shown to the admin before upgrading the app"),
_(
"doc/PRE_UPGRADE.md: important info to be shown to the admin before upgrading the app"
),
description=_("Leave empty if not relevant"),
validators=[Optional()],
render_kw={
"spellcheck": "false",
},
)
post_upgrade = TextAreaField(
_("doc/POST_UPGRADE.md: important info to be shown to the admin after upgrading the app"),
_(
"doc/POST_UPGRADE.md: important info to be shown to the admin after upgrading the app"
),
description=_("Leave empty if not relevant"),
validators=[Optional()],
render_kw={
Expand All @@ -583,9 +579,7 @@ class MoreAdvanced(FlaskForm):
_("Handle app install URL change (change_url script)"),
default=True,
render_kw={
"title": _(
"Should changing the app URL be allowed ? (change_url change)"
)
"title": _("Should changing the app URL be allowed ? (change_url change)")
},
)

Expand All @@ -601,9 +595,7 @@ class MoreAdvanced(FlaskForm):
# TODO : specify custom log file
# custom_log_file = "/var/log/$app/$app.log" "/var/log/nginx/${domain}-error.log"
use_fail2ban = BooleanField(
_(
"Protect the application against brute force attacks (via fail2ban)"
),
_("Protect the application against brute force attacks (via fail2ban)"),
default=False,
render_kw={
"title": _(
Expand Down

0 comments on commit 5f7bef0

Please sign in to comment.