pwwang / datar

A Grammar of Data Manipulation in python

Home Page:https://pwwang.github.io/datar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

yuemolin opened this issue · 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

commented

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

commented

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.

commented

Should be fixed by 0.11.2

Thank you! I just updated and it works fine!