From 3d3d37295fa6fa14e2ec23c89d30df9ee68ccdca Mon Sep 17 00:00:00 2001 From: hibobmaster <32976627+hibobmaster@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:19:48 +0800 Subject: [PATCH] fix: prevent a case that cause image generation not work chore: bump ruff-pre-commit to v0.0.290 --- .pre-commit-config.yaml | 2 +- src/imagegen.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d811573..cc25d41 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.289 + rev: v0.0.290 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/src/imagegen.py b/src/imagegen.py index fb54f14..2214eac 100644 --- a/src/imagegen.py +++ b/src/imagegen.py @@ -15,7 +15,7 @@ async def get_images( url, headers={ "Content-Type": "application/json", - "Authorization": "Bearer " + kwargs.get("api_key"), + "Authorization": f"Bearer {kwargs.get('api_key')}", }, json={ "prompt": prompt,