From dbdefe200c8ce8d6474f7ae97be1005f06c32ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20D=C3=BCster?= Date: Fri, 26 Jan 2024 08:08:37 +0100 Subject: [PATCH] Format files with ruff --- fdroidserver/btlog.py | 1 - fdroidserver/init.py | 4 ++-- fdroidserver/lint.py | 11 +++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/fdroidserver/btlog.py b/fdroidserver/btlog.py index fc49ac9a..3154b3de 100755 --- a/fdroidserver/btlog.py +++ b/fdroidserver/btlog.py @@ -27,7 +27,6 @@ # client app so its not easy for the server to distinguish this from # the F-Droid client. - import collections import defusedxml.minidom import git diff --git a/fdroidserver/init.py b/fdroidserver/init.py index d3195288..ab5a3e48 100644 --- a/fdroidserver/init.py +++ b/fdroidserver/init.py @@ -282,13 +282,13 @@ def main(): msg += '\n\n' msg += ( _( - '''To complete the setup, add your APKs to "%s" + """To complete the setup, add your APKs to "%s" then run "fdroid update -c; fdroid update". You might also want to edit "config.yml" to set the URL, repo name, and more. You should also set up a signing key (a temporary one might have been automatically generated). For more info: https://f-droid.org/docs/Setup_an_F-Droid_App_Repo -and https://f-droid.org/docs/Signing_Process''' +and https://f-droid.org/docs/Signing_Process""" ) % os.path.join(fdroiddir, 'repo') ) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 351667ba..d7a9783d 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -214,7 +214,7 @@ regex_checks = { _("Forbidden HTML tags"), ), ( - re.compile(r'''.*\s+src=["']javascript:.*'''), + re.compile(r""".*\s+src=["']javascript:.*"""), _("Javascript in HTML src attributes"), ), ], @@ -459,9 +459,12 @@ def check_builds(app): "Branch '{branch}' used as commit in srclib '{srclib}'" ).format(branch=s, srclib=srclib) else: - yield _( - 'srclibs missing name and/or @' - ) + ' (srclibs: ' + srclib + ')' + yield ( + _('srclibs missing name and/or @') + + ' (srclibs: ' + + srclib + + ')' + ) for key in build.keys(): if key not in supported_flags: yield _('%s is not an accepted build field') % key