当前位置:网站首页>Vscode configuration uses pylint syntax checker
Vscode configuration uses pylint syntax checker
2022-07-07 14:10:00 【jiang_ huixin】
- First installation “Python” plug-in unit
- install
pylint
Grammar checker
It is recommended to install on the current Python Environment
pip3 install pylint
- Enable
pylint
Grammar checker
open VSCode Configuration file for
Add the following :
{
// Code checking
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
// preservation Python Check syntax on file
"python.linting.lintOnSave": true
}
- To configure
pylint
Grammar checker
establish .pylintrc file
pylint --generate-rcfile > .pylintrc
among pylint be located Python Environmental Science ( Installed in this environment pylint) Medium bin Catalog , Running the above command may require specifying pylint The absolute path of
And then what will be generated .pylintrc Move the file to the root directory of the project
stay VSCode Add configuration to configuration :
{
// Appoint .pylintrc The path of , ${workspaceFolder} Represents the root directory of the current project
"python.linting.pylintArgs": [
"--rcfile=${workspaceFolder}/.pylintrc"
]
}
If pylint Not installed in VSCode Current Python Environmental Science , You need to add the following configurations ( Need to be revised pylint Actual path of )
{
// Appoint pylint The path of
"python.linting.pylintPath": "${env:HOME}/Miniconda/bin/pylint"
}
- Disable some check items
pylint There is an over check , The following is a prompt for not writing the module document string :
Yes 3 There are three levels of methods to disable such prompts :
- Add comments to the code
# pylint: disable=missing-module-docstring
- modify pylint Operation parameters of
modify VSCode Configuration of
The following shows how to disable invalid-name and missing-module-docstring Two inspection items :
{
"python.linting.pylintArgs": [
"--rcfile=${workspaceFolder}/.pylintrc",
"--disable=invalid-name,missing-module-docstring"
]
}
- modify .pylintrc file
stay .pylintrc Search for “diable”, Add an item at the end “missing-module-docstring”
disable=raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
not-callable,
missing-module-docstring
边栏推荐
- Take you to master the three-tier architecture (recommended Collection)
- MySQL "invalid use of null value" solution
- Excerpt from "misogyny: female disgust in Japan"
- Co create a collaborative ecosystem of software and hardware: the "Joint submission" of graphcore IPU and Baidu PaddlePaddle appeared in mlperf
- Parsing of XML files
- Laravel5 call to undefined function openssl cipher iv length() 报错 PHP7开启OpenSSL扩展失败
- How to check the ram and ROM usage of MCU through Keil
- Sliding rail stepping motor commissioning (national ocean vehicle competition) (STM32 master control)
- AI talent cultivation new ideas, this live broadcast has what you care about
- 常用数字信号编码之反向不归零码码、曼彻斯特编码、差分曼彻斯特编码
猜你喜欢
Leetcode simple question sharing (20)
Best practice | using Tencent cloud AI willingness to audit as the escort of telephone compliance
js 获取当前时间 年月日,uniapp定位 小程序打开地图选择地点
2022-7-6 Leetcode 977. Square of ordered array
Selenium库
gvim【三】【_vimrc配置】
高等數學---第八章多元函數微分學1
最长上升子序列模型 AcWing 482. 合唱队形
VSCode 配置使用 PyLint 语法检查器
Build a secure and trusted computing platform based on Kunpeng's native security
随机推荐
Beginner XML
Dry goods | summarize the linkage use of those vulnerability tools
2022-7-6 Leetcode27. Remove the element - I haven't done the problem for a long time. It's such an embarrassing day for double pointers
Did login metamask
Regular expression integer positive integer some basic expressions
. Net core about redis pipeline and transactions
[fortress machine] what is the difference between cloud fortress machine and ordinary fortress machine?
Vmware共享主机的有线网络IP地址
ES日志报错赏析-Limit of total fields
MySQL "invalid use of null value" solution
What are the principles for distinguishing the security objectives and implementation methods that cloud computing security expansion requires to focus on?
数据库系统概论-第一章绪论【概念模型、层次模型和三级模式(外模式、模式、内模式)】
Environment configuration
Realize the IP address home display function and number home query
Attribute keywords aliases, calculated, cardinality, ClientName
c#通过frame 和 page 切换页面
Redis 核心数据结构 & Redis 6 新特性详
Selenium库
Parsing of XML files
Es log error appreciation -limit of total fields