🎨 Format Python code with Black
This commit is contained in:
parent
f6cd32a2e8
commit
7aad6f7683
2 changed files with 18 additions and 15 deletions
|
@ -19,13 +19,18 @@ def notify(message, channel):
|
||||||
message = message.replace(char, "")
|
message = message.replace(char, "")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subprocess.call([
|
subprocess.call(
|
||||||
|
[
|
||||||
"/var/www/webhooks/matrix-commander",
|
"/var/www/webhooks/matrix-commander",
|
||||||
"--markdown",
|
"--markdown",
|
||||||
"-m", message,
|
"-m",
|
||||||
"-c", "/var/www/webhooks/credentials.json",
|
message,
|
||||||
"--store", "/var/www/webhooks/store",
|
"-c",
|
||||||
"--room", f"yunohost-{channel}",
|
"/var/www/webhooks/credentials.json",
|
||||||
|
"--store",
|
||||||
|
"/var/www/webhooks/store",
|
||||||
|
"--room",
|
||||||
|
f"yunohost-{channel}",
|
||||||
],
|
],
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=subprocess.DEVNULL,
|
||||||
)
|
)
|
||||||
|
|
|
@ -54,13 +54,11 @@ STRATEGIES = [
|
||||||
|
|
||||||
|
|
||||||
@cache
|
@cache
|
||||||
def get_github() -> (
|
def get_github() -> tuple[
|
||||||
tuple[
|
|
||||||
Optional[tuple[str, str]],
|
Optional[tuple[str, str]],
|
||||||
Optional[github.Github],
|
Optional[github.Github],
|
||||||
Optional[github.InputGitAuthor],
|
Optional[github.InputGitAuthor],
|
||||||
]
|
]:
|
||||||
):
|
|
||||||
try:
|
try:
|
||||||
github_login = (
|
github_login = (
|
||||||
(REPO_APPS_ROOT / ".github_login")
|
(REPO_APPS_ROOT / ".github_login")
|
||||||
|
@ -453,8 +451,8 @@ class AppAutoUpdater:
|
||||||
|
|
||||||
api: Union[GithubAPI, GitlabAPI, GiteaForgejoAPI]
|
api: Union[GithubAPI, GitlabAPI, GiteaForgejoAPI]
|
||||||
if remote_type == "github":
|
if remote_type == "github":
|
||||||
assert (
|
assert upstream and upstream.startswith(
|
||||||
upstream and upstream.startswith("https://github.com/")
|
"https://github.com/"
|
||||||
), f"When using strategy {strategy}, having a defined upstream code repo on github.com is required"
|
), f"When using strategy {strategy}, having a defined upstream code repo on github.com is required"
|
||||||
api = GithubAPI(upstream, auth=get_github()[0])
|
api = GithubAPI(upstream, auth=get_github()[0])
|
||||||
if remote_type == "gitlab":
|
if remote_type == "gitlab":
|
||||||
|
|
Loading…
Reference in a new issue