diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d89416a..eaf4f94e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,17 +14,17 @@ fail_fast: true repos: - repo: https://github.com/adamchainz/django-upgrade - rev: '1.22.1' + rev: '1.22.2' hooks: - id: django-upgrade args: [--target-version, "3.2"] - repo: https://github.com/asottile/pyupgrade - rev: v3.19.0 + rev: v3.19.1 hooks: - id: pyupgrade args: ["--py310-plus"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.2 + rev: v0.8.6 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] 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):