Skip to content

Commit

Permalink
ci: auto fixes from pre-commit hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 3, 2024
1 parent 71ab10d commit a23927e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/default_eventpage_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion story/management/commands/fetch_tumblr_stories.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a23927e

Please sign in to comment.