microsoft / vscode-mypy

Linting support for Python using the mypy linter.
https://marketplace.visualstudio.com/items?itemName=ms-python.mypy-type-checker
MIT License
119 stars 26 forks source link

Enable on Jupyter notebooks #86

Open salcc opened 1 year ago

salcc commented 1 year ago

The extension does not lint .ipynb files.

mrclmh commented 7 months ago

Is feedback other than a "thumbs up" required? Is there a defined threshold above which the feature request will be accepted?

rd-andreas-lay commented 7 months ago

Would be great to have this. I have currently set up my .pre-commit-config.yaml such that notebooks are linted using nbqa:

-   repo: local
    hooks:
     -  id: mypy-jupyter
        name: mypy-jupyter
        entry: nbqa mypy
        language: system
        types: [jupyter]
        require_serial: true

It'd be nice to get linting working directly through the vscode-mypy extension though.

ninjaguardian commented 5 months ago

It would make it so I don't have to move my code to see if mypy is yelling at me.

xhiroga commented 4 months ago

I've been using nb-mypy as an alternative, but it performs runtime type checking, which tends to slow down execution noticeably. Having static type checking directly within the vscode-mypy extension would be extremely beneficial. I strongly support the implementation of this feature!