Tweak types
This commit is contained in:
parent
f551fd5f28
commit
efad4631fb
1 changed files with 3 additions and 1 deletions
|
|
@ -10,7 +10,9 @@ try:
|
||||||
from cv2_enumerate_cameras.camera_info import CameraInfo
|
from cv2_enumerate_cameras.camera_info import CameraInfo
|
||||||
|
|
||||||
enumerate_cameras: Optional[Callable[[int], list[CameraInfo]]]
|
enumerate_cameras: Optional[Callable[[int], list[CameraInfo]]]
|
||||||
from cv2_enumerate_cameras import enumerate_cameras
|
# MyPy thinks enumerate_cameras is being redefined. We just needed to set the type
|
||||||
|
# before defining.
|
||||||
|
from cv2_enumerate_cameras import enumerate_cameras # type: ignore[no-redef]
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
enumerate_cameras = None
|
enumerate_cameras = None
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue