Skip to content

Commit da28dbc

Browse files
committed
changed stuff for mypy and ruff
1 parent e096371 commit da28dbc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tagstudio/src/qt/widgets/preview_panel.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,14 @@ def __init__(self, library: Library, driver: "QtDriver"):
161161

162162
qmovie_formats = QMovie.supportedFormats()
163163

164-
self.preview_anim_img_fmts = [fmt.data().decode("utf-8") for fmt in qmovie_formats]
164+
self.preview_anim_img_fmts = [
165+
(
166+
fmt_data.decode("utf-8")
167+
if isinstance(fmt_data := fmt.data(), (bytes, bytearray))
168+
else ""
169+
)
170+
for fmt in qmovie_formats
171+
]
165172

166173
ani_img_priority_order = ["jxl", "apng", "png", "webp", "gif"]
167174

0 commit comments

Comments
 (0)