pylint is a plug-in that comes with python in VScode, which can help standardize and make the code beautiful. But there are some errors you don’t want to see, and you can selectively ignore them.
If you want to customize ignoring errors, do the following:
1. Search for python.linting.pylintArgs
in the setting.json file. 2. Modify as follows. Write the picture description here
3. Add the string --disable=error code to python.linting.pylintArgs. If there are multiple error codes, separate them with parentheses. I've only ignored E1101 here. You can change it to E1101, E1102
Note: I read a lot of information on the Internet here, and many people said to add --disable-msg=error code. But this method does not apply to me. Maybe I downloaded it. is the latest version. Just use the method mentioned above, and you can do it without adding msg.
This is what I added to the user setting user_setting in setting.json:
"python.linting.pylintArgs": [ "--disable=E1101", "--disable=W,C" ]
--disable=E1101 is to ignore the E1101 error
-- disable=W,C This is to ignore the warning warning and C
PHP Chinese website, there are a lot of free vscode introductory tutorials, everyone is welcome to learn!
The above is the detailed content of How to ignore errors in vscode. For more information, please follow other related articles on the PHP Chinese website!