-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Type stubs: cv2.__init__.pyi is missing module re-exports #23777
Copy link
Copy link
Closed
Description
System Information
OpenCV python: opencv_python_headless-4.7.0+772599a-cp37-abi3-win_amd64.whl
Operating System / Platform: 10.0.19045 Build 19045
Python version: 3.9.13
Detailed description
cv2.__init__.pyi is missing module re-exports, which should look something like this:
from cv2 import aruco as aruco
from cv2 import cuda as cuda
from cv2 import data as data
from cv2 import detail as detail
from cv2 import dnn as dnn
from cv2 import Error as Error
from cv2 import fisheye as fisheye
from cv2 import flann as flann
from cv2 import gapi as gapi
from cv2 import ipp as ipp
from cv2 import mat_wrapper as mat_wrapper
from cv2 import misc as misc
from cv2 import ml as ml
from cv2 import ocl as ocl
from cv2 import ogl as ogl
from cv2 import parallel as parallel
from cv2 import samples as samples
from cv2 import segmentation as segmentation
from cv2 import typing as typing
from cv2 import utils as utils
from cv2 import videoio_registry as videoio_registrySteps to reproduce
The following should be acceptable to static type checkers, but is not:
import cv2
# Argument type is unknown
# Argument corresponds to parameter "values" in function "print"PylancereportUnknownArgumentType
# "cuda" is not a known member of module "cv2"PylancereportGeneralTypeIssues
# (function) cuda: Unknown
print(cv2.Error)>>> import cv2
>>> cv2.Error.StsOk
0Issue 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)
Reactions are currently unavailable