Skip to content

Commit

Permalink
🎨 Format Python code with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar committed Mar 18, 2024
1 parent f0870eb commit 1713b64
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
17 changes: 11 additions & 6 deletions tools/appslib/logging_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
16 changes: 7 additions & 9 deletions tools/autoupdate_app_sources/autoupdate_app_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,11 @@


@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")
Expand Down Expand Up @@ -453,8 +451,8 @@ def get_latest_version_and_asset(

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":
Expand Down

0 comments on commit 1713b64

Please sign in to comment.