From 7aad6f7683e0ed70a6ad00244ac9e4d581f64a8a Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:28:50 +0000 Subject: [PATCH] :art: Format Python code with Black --- appslib/logging_sender.py | 17 +++++++++++------ .../autoupdate_app_sources.py | 16 +++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/appslib/logging_sender.py b/appslib/logging_sender.py index 10c5823..aa5b020 100644 --- a/appslib/logging_sender.py +++ b/appslib/logging_sender.py @@ -19,13 +19,18 @@ def notify(message, channel): message = message.replace(char, "") try: - subprocess.call([ + subprocess.call( + [ "/var/www/webhooks/matrix-commander", - "--markdown", - "-m", message, - "-c", "/var/www/webhooks/credentials.json", - "--store", "/var/www/webhooks/store", - "--room", f"yunohost-{channel}", + "--markdown", + "-m", + message, + "-c", + "/var/www/webhooks/credentials.json", + "--store", + "/var/www/webhooks/store", + "--room", + f"yunohost-{channel}", ], stdout=subprocess.DEVNULL, ) diff --git a/autoupdate_app_sources/autoupdate_app_sources.py b/autoupdate_app_sources/autoupdate_app_sources.py index 5f0bc6a..b6e6741 100755 --- a/autoupdate_app_sources/autoupdate_app_sources.py +++ b/autoupdate_app_sources/autoupdate_app_sources.py @@ -54,13 +54,11 @@ STRATEGIES = [ @cache -def get_github() -> ( - tuple[ - Optional[tuple[str, str]], - Optional[github.Github], - Optional[github.InputGitAuthor], - ] -): +def get_github() -> tuple[ + Optional[tuple[str, str]], + Optional[github.Github], + Optional[github.InputGitAuthor], +]: try: github_login = ( (REPO_APPS_ROOT / ".github_login") @@ -453,8 +451,8 @@ class AppAutoUpdater: api: Union[GithubAPI, GitlabAPI, GiteaForgejoAPI] if remote_type == "github": - assert ( - upstream and upstream.startswith("https://github.com/") + assert upstream and upstream.startswith( + "https://github.com/" ), f"When using strategy {strategy}, having a defined upstream code repo on github.com is required" api = GithubAPI(upstream, auth=get_github()[0]) if remote_type == "gitlab":