Question:
I’m working on a Python project in Visual Studio Code, and I’m getting persistent yellow warning lines in my code. I want to completely disable these, but so far, I’ve had no luck. Here’s what I’ve tried:

-
Disabling Pylint and Other Linters: I’ve attempted to disable all Python linting by adding the following to my
settings.jsonfile:"python.linting.enabled": false -
Changing the Type Checking Mode: I’ve modified the Python analysis settings in my
settings.jsonfile as follows:"python.analysis.typeCheckingMode": "basic" "python.analysis.typeCheckingMode": "off" -
Customizing Editor Warnings and Errors: I’ve tried to change the color of the error and warning lines with the following settings in my
settings.jsonfile:"editorError.foreground": "#00000000", "editorWarning.foreground": "#00000000", "editorInfo.foreground": "#00000000" -
Restarting VS Code: I’ve fully closed and reopened VS Code after making these changes.
-
Checking Workspace and Project-Specific Settings: I’ve checked for workspace or project-specific settings that might be overriding my global settings.
Despite these attempts, the yellow warning lines have not disappeared. They changed from red to yellow, but I would like to remove them entirely. How can I achieve this?
>Solution :
I’m not looking to resolve the errors but merely to study the code without the distraction of these warnings.
I understand that warnings generally indicate potential issues in the code, but in this specific case, I’m working with a segment of code for learning purposes, and the warnings were more of a distraction.
For this there is the following method
Violent solution:
"python.analysis.diagnosticSeverityOverrides": {
"reportUndefinedVariable": "none"
},
But warnings generally indicate that your code may be incorrect, and the most correct way should be to modify your code to be correct and compliant.
More configurable values for this setting can be found in Diagnostic severity rules in this link.
https://code.visualstudio.com/docs/python/settings-reference#_python-language-server-settings
