From a23927ed917ecefb30d484a30bd1a5799d0f5639 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 00:43:57 +0000 Subject: [PATCH] ci: auto fixes from pre-commit hooks for more information, see https://pre-commit.ci --- core/default_eventpage_content.py | 2 +- story/management/commands/fetch_tumblr_stories.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/default_eventpage_content.py b/core/default_eventpage_content.py index e7cc105bc..41afd8136 100644 --- a/core/default_eventpage_content.py +++ b/core/default_eventpage_content.py @@ -27,7 +27,7 @@ def get_random_photo(section): if section in DEFAULT_BACKGROUND_PHOTOS: photos = DEFAULT_BACKGROUND_PHOTOS[section] - return UploadedFile(open(photos[random.randint(0, len(photos) - 1)], "rb")) # noqa: SIM115 + return UploadedFile(open(photos[random.randint(0, len(photos) - 1)], "rb")) return None diff --git a/story/management/commands/fetch_tumblr_stories.py b/story/management/commands/fetch_tumblr_stories.py index 1d56d7711..2b442c2b8 100644 --- a/story/management/commands/fetch_tumblr_stories.py +++ b/story/management/commands/fetch_tumblr_stories.py @@ -13,7 +13,7 @@ def download_image(url: str) -> tuple[str, File]: image_name = urlparse(url).path.split("/")[-1] content = urlretrieve(url) # TODO: could this be done differently without opening the file here? - return image_name, File(open(content[0], "rb")) # noqa: SIM115 + return image_name, File(open(content[0], "rb")) class Command(BaseCommand):