Open jorenham opened 1 month ago
hmm maybe i should just disable reportMissingModuleSource
in the playground, but i don't really want to introduce different behavior in the playground so idk
I know that pyodide can dynamically load python packages in-browser using micropip. So maybe that could be used here.
That also opens the door to loading arbitrary packages. When I'm numpy when I'm working on numpy's typing stubs, I often tend to go to the basedpyright playground, only to realize that there's no numpy there; but maybe that's just me 🤷🏻. The same goed for optype
btw.
Anyway, I think it would be very helpful to be a able to install packages into the playground.
Having a runtime available would also be helpful I think. That way you can verify if your typing examples match up with the runtime, and check that it actually runs.
I just tried out the (awesome) new client-side playground, and found a tiny bug, which actually would be a nice feature:
So I decide to do what I'm told, and
import typing_extensions
, after which I'm told thatI first guessed that it has to do with typeshed's stdlib stubs, which contain the
typing_extensions.pyi
phantom stubs. But it turns out that I'm missing something, because_typeshed
(also a typeshed phantom), actually imports without error 🤔:https://basedpyright.com/?typeCheckingMode=all&reportUnusedImport=true&code=JYWwDg9gTgLgBAOwK7gJ5zgYjgYwDYCmAhlHugCYQEDOCA5PAQB7DUwBQokscMqYwBAHMA%2BsxgEE1YBCkZsbJACNqAWlllO4aPBF8wNABYFy8uADpLAfiA
Either way, I think it would be helpful to have
typing_extensions
available although I have no idea how, because I didn't see a (c)python runtime i.e. no search results came up for "pyodide".