-
-
Notifications
You must be signed in to change notification settings - Fork 56.4k
Closed
Closed
Copy link
Description
System Information
OpenCV python version: 4.8.1.78
Operating System / Platform: Windows 10
Python version: 3.9.13
Detailed description
Aliasing typing (stdlib) in cv2/__init__.pyi works around python/mypy#16216 and fixes opencv/opencv-python#901
And allow type checkers to see that the typing symbol in cv2 at runtime is actually cv2.typing.
It would look something like that:
import typing as _typing
from cv2 import typing as typingSteps to reproduce
import cv2
import cv2.typing
_ = cv2.typing.MatLikeand:
import cv2
_ = cv2.typing.MatLiketest with both pyright and mypy
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)