withered-magic/starpls

Uknown type "List"

hauserx opened this issue · 2 comments

starpls README links this doc about type hinting, but looks it does not work for e.g. List ?
https://peps.python.org/pep-0484/#type-comments

image

Ah it doesn't follow that doc exactly, it uses the types as described in https://github.com/bazelbuild/starlark/blob/master/spec.md#data-types (including respecting capitalization)

So in this case you can use list instead of List

Thanks! Maybe worth changing the main readme?

BTW. If I use # type: list[MyCustomInfo] it also complains that the MyCustomInfo is not defined (which is through provider()), but I guess this is the other issue #236