The above post asks how to disable linting in VS Code by Pylance. This proposed setting works:
"python.languageServer": "None"
But it also disables features like Intellisense and Go to Definition. I want to keep those features working and disable the automatic linting done by Pylance as I'm actively writing out code. It's very distracting.
Note that setting "python.linting.enabled": false
doesn't work; Pylance still points out "problems" in code the moment I stop typing.
I also don't want to disable linting entirely, I just want to have more control over when my files are linted (like getting warnings after saving). I'm also using other programs like flake8 and bandit which provide the functionality I need and can be shut off until I'm ready to check my code.
Update:
I found a way to disable specific Pylance warnings by referencing this document in pylance-release. Setting a rule to none disables warnings for that rule. I added the following to my settings.json:
"python.analysis.diagnosticSeverityOverrides": {
"reportUnboundVariable": "none",
"reportUndefinedVariable": "none",
"reportMissingImports": "none",
"reportMissingModuleSource": "none",
}
I did not however find a way to disable syntax error warnings.