Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode / Pylance / Disable TypeChecking?

I would like to disable the underlining of errors like .text in this example enter image description here

But it would be ok for me when eg. driver is wrong written like that

enter image description here

In my defaultSettings.json the parameter for this option is set:

"python.analysis.typeCheckingMode": "off",

And in my settings.json this parameter is not at all.

So why is Pylance still underlining the .text-command? I only want that it is underlining error like wrong written driver?

like image 491
Rapid1898 Avatar asked Jul 21 '26 06:07

Rapid1898


1 Answers

I found the solution - There are two settings.json in VSCode - one for "User" and one for "Workspace":

enter image description here

I only checked the settings.json for "User" and there was no entry for the parameter "python.analysis.typeCheckingMode"

When I checked the "Workspace" settings.json I saw this entry

python.analysis.typeCheckingMode": "basic"

I changed it to "off" and now everything works again as wanted.

These are the different options for this parameter for the pylance-extension:

  • off: No type checking analysis is conducted; unresolved imports/variables diagnostics are produced
  • basic: Non-type checking-related rules (all rules in off) + basic type checking rules
  • strict: All type checking rules at the highest severity of error (includes all rules in off and basic categories)
like image 130
Rapid1898 Avatar answered Jul 22 '26 19:07

Rapid1898



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!