Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Pylance emits the warnning 'Code is unreachable' #13673

Merged
merged 1 commit into from
Dec 30, 2022

Conversation

lightzhan-intellif
Copy link
Contributor

For the users who use vscode to write code, Pylance in vscode will shadow the code below the function calls tvm.ir.load_json/save_json and tell users "Code is unreachable" like the picture below:

image

The issue maybe confuses users and make the code a little "dirty".

This PR fixes this by adding a return type hint to the functions load_json and save_json.

…or the code below the function calls tvm.ir.load_json/save_json.
@tvm-bot
Copy link
Collaborator

tvm-bot commented Dec 30, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: bugfix See #10317 for details

Generated by tvm-bot

@lightzhan-intellif lightzhan-intellif changed the title Fix the issue that pylance emits the warnning 'Code is unreachable' f… [BugFix] Pylance emits the warnning 'Code is unreachable' Dec 30, 2022
@tqchen tqchen merged commit 6f6bf19 into apache:main Dec 30, 2022
fzi-peccia pushed a commit to fzi-peccia/tvm that referenced this pull request Mar 27, 2023
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants