From 1bffe170e13cd1bfaef1edb315dc51ffb97e0e92 Mon Sep 17 00:00:00 2001 From: triple Mu Date: Sat, 27 May 2023 17:23:32 +0800 Subject: [PATCH] Update setup.py Fix error: UnboundLocalError: local variable 'typing_stub_files' referenced before assignment --- modules/python/package/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/python/package/setup.py b/modules/python/package/setup.py index aa856ec7a5..dff493da0f 100644 --- a/modules/python/package/setup.py +++ b/modules/python/package/setup.py @@ -25,6 +25,7 @@ def main(): root_module_path = os.path.join(SCRIPT_DIR, "cv2") py_typed_path = os.path.join(root_module_path, "py.typed") + typing_stub_files = [] if os.path.isfile(py_typed_path): typing_stub_files = collect_module_typing_stub_files(root_module_path) if len(typing_stub_files) > 0: