Home > Enterprise >  How to ignore Pylance type checking on notebooks?
How to ignore Pylance type checking on notebooks?

Time:05-17

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:

type ignore python file

But it seems it does not work on notebooks: type ignore notebook

I get the following type error:

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

enter image description here

How can I ignore type checking on notebooks ?

CodePudding user response:

That is a VS Code screenshot with error ignored

  • Related