diff --git a/core/default_eventpage_content.py b/core/default_eventpage_content.py index e7cc105b..41afd813 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 1d56d771..2b442c2b 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):