python-streamz / streamz

Real-time stream processing for python
https://streamz.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
1.24k stars 149 forks source link

streamz's typing system can't work properly in vscode #473

Open ghost opened 11 months ago

ghost commented 11 months ago

summary

streamz's typing system can't work properly in vscode, severely reduceing user experience.

vscode version

Version: 1.83.1 (system setup) Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc Date: 2023-10-10T23:48:05.904Z Electron: 25.8.4 ElectronBuildId: 24154031 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22621

streamz version

name : streamz version : 0.6.4 description : Streams

dependencies

python version

3.10.2

evidence

image image

martindurant commented 11 months ago

Sorry, I have no idea of how to inform VSCode of what's going on.

MarcSkovMadsen commented 2 months ago

I believe the challenge is that map is registered dynamically via @Stream.register_api().

I've sometimes had success asking for help in the Pylance or Pyright github forums for questions like these. Those two tools are what typically powers VS Code.

But basically, if mypy can understand that .map is there. Then Pylance/ Pyright can too.