Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#210)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 24.1.1 → 24.2.0](psf/black@24.1.1...24.2.0)
- [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.2.1](astral-sh/ruff-pre-commit@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>
  • Loading branch information
pre-commit-ci[bot] authored Feb 13, 2024
1 parent be2003c commit ab16f0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.2.0
hooks:
- id: black

Expand All @@ -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

Expand Down
10 changes: 6 additions & 4 deletions pillow_heif/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ab16f0a

Please sign in to comment.