[Python] How to ignore Pylance type checking on notebooks?

Discussão em 'Python' iniciado por Stack, Julho 5, 2025.

  1. Stack

    Stack Membro Participativo

    I have a python project in which I have python files and notebooks.

    I use strict typing in my project but I would like to remove it only on notebooks. I use VScode with setting:

    "python.analysis.typeCheckingMode": "strict"


    I know how to ignore type on a python file:

    [​IMG]

    But it seems it does not work on notebooks: [​IMG]

    I get the following type error:


    "Type of "y" is partially unknown
    Type of "y" is "Unknown | None (pylance)"
    ​

    [​IMG]

    How can I ignore type checking on notebooks ?

    Continue reading...

Compartilhe esta Página