Skip to content

feat: re-export symbols to cv2 level#23809

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
VadimLevin:dev/vlevin/re-export-stubs-submodules
Jun 16, 2023
Merged

feat: re-export symbols to cv2 level#23809
asmorkalov merged 1 commit intoopencv:4.xfrom
VadimLevin:dev/vlevin/re-export-stubs-submodules

Conversation

@VadimLevin
Copy link
Copy Markdown
Contributor

  • Re-export native submodules of cv2 package level.
  • Re-export manually registered symbols like cv2.mat_wrapper.Mat

__init__.pyi file import section after patch

# other imports 

# --- Added section ---
from cv2 import Error as Error
from cv2 import aruco as aruco
from cv2 import cuda as cuda
from cv2 import detail as detail
from cv2 import dnn as dnn
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 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 utils as utils
from cv2 import videoio_registry as videoio_registry
from cv2.mat_wrapper import Mat as Mat
# --- Added section ---

# Rest of the file is unchanged

Resolves: #23777

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

- Re-export native submodules of cv2 package level.
- Re-export  manually registered  symbols like cv2.mat_wrapper.Mat
@VadimLevin VadimLevin added this to the 4.8.0 milestone Jun 15, 2023
@VadimLevin VadimLevin requested a review from asmorkalov June 15, 2023 13:36
@VadimLevin VadimLevin self-assigned this Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type stubs: cv2.__init__.pyi is missing module re-exports

2 participants