From 33046d0bc34539236fbdb26d2f4f876b5bce6597 Mon Sep 17 00:00:00 2001 From: lightzhan-intellif Date: Fri, 30 Dec 2022 06:45:44 +0000 Subject: [PATCH] Fix the issue that pylance emits the warnning 'Code is unreachable' for the code below the function calls tvm.ir.load_json/save_json. --- python/tvm/ir/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tvm/ir/base.py b/python/tvm/ir/base.py index c6b30d38edac..d754ae567c5e 100644 --- a/python/tvm/ir/base.py +++ b/python/tvm/ir/base.py @@ -120,7 +120,7 @@ def get(name): return _ffi_api.EnvFuncGet(name) -def load_json(json_str): +def load_json(json_str) -> Object: """Load tvm object from json_str. Parameters @@ -141,7 +141,7 @@ def load_json(json_str): return tvm.runtime._ffi_node_api.LoadJSON(json_str) -def save_json(node): +def save_json(node) -> str: """Save tvm object as json string. Parameters