pwwang/datar

In VScode, the code will be masked as comments [QST]

yuemolin opened this issue · 4 comments

Question about datar

Hi~
I'm currently switching from R to python, and I really like and appreciate the packages. But when I use it in vscode, it will be recognized as comments instead of code, which will make all the following code "grey", is there any way to solve this problem? Thanks!
image

It's actually marked as "Code is unreachable" by Pylance. Will dig into it.

It's not an actual bug but because of the type annotations about the return value of the registered function.

image

Currently, we don't have the annotation for the return value of the function, and by default the function raises a NotImplementedError, so Pylance thinks the error is for sure to be raised, so the code after it will not be reached.

Will try to add return value annotations to those functions in the next patch version.

Should be fixed by 0.11.2

Thank you! I just updated and it works fine!