From 2df6241485978ca191ec53af74290e660111f59f Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Tue, 28 May 2024 17:11:13 +0000 Subject: [PATCH] :art: Format Python code with Black --- readme_generator/regen_readme_in_batch.py | 4 +++- readme_generator/webhook.py | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/readme_generator/regen_readme_in_batch.py b/readme_generator/regen_readme_in_batch.py index 736d1e6..11207da 100644 --- a/readme_generator/regen_readme_in_batch.py +++ b/readme_generator/regen_readme_in_batch.py @@ -13,7 +13,9 @@ from pathlib import Path TOOLS_DIR = Path(__file__).resolve().parent.parent -secret = (TOOLS_DIR / ".github_webhook_secret").open("r", encoding="utf-8").read().strip() +secret = ( + (TOOLS_DIR / ".github_webhook_secret").open("r", encoding="utf-8").read().strip() +) login = (TOOLS_DIR / ".github_login").open("r", encoding="utf-8").read().strip() token = (TOOLS_DIR / ".github_token").open("r", encoding="utf-8").read().strip() diff --git a/readme_generator/webhook.py b/readme_generator/webhook.py index 4adcbe1..3e66875 100755 --- a/readme_generator/webhook.py +++ b/readme_generator/webhook.py @@ -15,9 +15,15 @@ TOOLS_DIR = Path(__file__).resolve().parent.parent app = Sanic(__name__) + @cache def github_webhook_secret() -> str: - return (TOOLS_DIR / ".github_webhook_secret").open("r", encoding="utf-8").read().strip() + return ( + (TOOLS_DIR / ".github_webhook_secret") + .open("r", encoding="utf-8") + .read() + .strip() + ) @cache