Skip to content

Commit

Permalink
[BugFix] Pylance emits the warnning 'Code is unreachable' (apache#13673)
Browse files Browse the repository at this point in the history
Fix the issue that pylance emits the warnning 'Code is unreachable' for the code  below the function calls tvm.ir.load_json/save_json.

Co-authored-by: lightzhan-intellif <[email protected]>
  • Loading branch information
2 people authored and fzi-peccia committed Mar 27, 2023
1 parent e9cd558 commit 0fad2de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tvm/ir/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0fad2de

Please sign in to comment.