Skip to content

Commit e928d33

Browse files
[pre-commit.ci] pre-commit autoupdate (#224)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.3.3 → v0.3.4](astral-sh/ruff-pre-commit@v0.3.3...v0.3.4) * fixed ruff's SIM103 warning Signed-off-by: Alexander Piskun <[email protected]> --------- Signed-off-by: Alexander Piskun <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alexander Piskun <[email protected]>
1 parent d4679d6 commit e928d33

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
- id: pyproject-fmt
3030

3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: v0.3.3
32+
rev: v0.3.4
3333
hooks:
3434
- id: ruff
3535

libheif/linux_build_libs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ def check_install_nasm(version: str):
9999

100100
def is_musllinux() -> bool:
101101
_ = run("ldd --version".split(), stdout=PIPE, stderr=STDOUT, check=False)
102-
if _.stdout and _.stdout.decode("utf-8").find("musl") != -1:
103-
return True
104-
return False
102+
return bool(_.stdout and _.stdout.decode("utf-8").find("musl") != -1)
105103

106104

107105
def is_library_installed(name: str) -> bool:

pillow_heif/as_plugin.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,7 @@ def _is_supported_heif(fp) -> bool:
139139
magic = _get_bytes(fp, 12)
140140
if magic[4:8] != b"ftyp":
141141
return False
142-
if magic[8:12] in (
143-
b"heic",
144-
b"heix",
145-
b"heim",
146-
b"heis",
147-
b"hevc",
148-
b"hevx",
149-
b"hevm",
150-
b"hevs",
151-
b"mif1",
152-
b"msf1",
153-
):
154-
return True
155-
return False
142+
return magic[8:12] in (b"heic", b"heix", b"heim", b"heis", b"hevc", b"hevx", b"hevm", b"hevs", b"mif1", b"msf1")
156143

157144

158145
def _save_heif(im, fp, _filename):

0 commit comments

Comments
 (0)