Unconditionally import turbojpeg from camera (#141995)

This commit is contained in:
Erik Montnemery
2025-04-01 14:24:15 +02:00
committed by GitHub
parent 145e02769c
commit fa9613a879

View File

@@ -2,17 +2,10 @@
from __future__ import annotations
from contextlib import suppress
import logging
from typing import TYPE_CHECKING, Literal, cast
with suppress(Exception):
# TurboJPEG imports numpy which may or may not work so
# we have to guard the import here. We still want
# to import it at top level so it gets loaded
# in the import executor and not in the event loop.
from turbojpeg import TurboJPEG
from turbojpeg import TurboJPEG
if TYPE_CHECKING:
from . import Image