mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
feat: add OpenCV error class to cv2/__init__.pyi
This commit is contained in:
parent
5859a531e5
commit
69ebecc54f
@ -8,6 +8,10 @@ from .ast_utils import find_function_node, SymbolName
|
||||
|
||||
|
||||
def apply_manual_api_refinement(root: NamespaceNode) -> None:
|
||||
# Export OpenCV exception class
|
||||
builtin_exception = root.add_class("Exception")
|
||||
builtin_exception.is_exported = False
|
||||
root.add_class("error", (builtin_exception, ))
|
||||
for symbol_name, refine_symbol in NODES_TO_REFINE.items():
|
||||
refine_symbol(root, symbol_name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user