From ab16f0a7e5c5be86686203e001a8e01e631dcff1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:04:37 +0300 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 24.1.1 → 24.2.0](https://github.com/psf/black/compare/24.1.1...24.2.0) - [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.2.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.0...v0.2.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- pillow_heif/misc.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5dd89e34..d17ed58c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 24.1.1 + rev: 24.2.0 hooks: - id: black @@ -29,7 +29,7 @@ repos: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.0 + rev: v0.2.1 hooks: - id: ruff diff --git a/pillow_heif/misc.py b/pillow_heif/misc.py index 5d626f34..646745e5 100644 --- a/pillow_heif/misc.py +++ b/pillow_heif/misc.py @@ -378,10 +378,12 @@ def _finish_add_image(self, im_out, size: tuple, **kwargs): im_out.set_icc_profile(kwargs.get("icc_profile_type", "prof"), __icc_profile) # set NCLX color profile if kwargs.get("nclx_profile", None): - im_out.set_nclx_profile(*[ - kwargs["nclx_profile"][i] - for i in ("color_primaries", "transfer_characteristics", "matrix_coefficients", "full_range_flag") - ]) + im_out.set_nclx_profile( + *[ + kwargs["nclx_profile"][i] + for i in ("color_primaries", "transfer_characteristics", "matrix_coefficients", "full_range_flag") + ] + ) # encode image_orientation = kwargs.get("image_orientation", 1) im_out.encode(