Home > Development Tools > VSCode > body text

How to ignore errors in vscode

爱喝马黛茶的安东尼
Release: 2019-12-07 13:36:53
Original
10316 people have browsed it

How to ignore errors in vscode

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"
    ]
Copy after login

--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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template