当前位置:网站首页>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
pylintGrammar checker
It is recommended to install on the current Python Environment
pip3 install pylint
- Enable
pylintGrammar 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
pylintGrammar 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
边栏推荐
猜你喜欢

2022-7-6 sigurg is used to receive external data. I don't know why it can't be printed out

AutoCAD - how to input angle dimensions and CAD diameter symbols greater than 180 degrees?

【立体匹配论文阅读】【三】INTS

Dry goods | summarize the linkage use of those vulnerability tools
![供应链供需预估-[时间序列]](/img/2c/82d118cfbcef4498998298dd3844b1.png)
供应链供需预估-[时间序列]

566. Reshaping the matrix

.net core 关于redis的pipeline以及事务

Deep understanding of array related problems in C language

Navicat run SQL file import data incomplete or import failed

566. 重塑矩阵
随机推荐
Move base parameter analysis and experience summary
js 获取当前时间 年月日,uniapp定位 小程序打开地图选择地点
c#利用 TCP 协议建立连接
118. 杨辉三角
Deep understanding of array related problems in C language
内存溢出和内存泄漏的区别
Wired network IP address of VMware shared host
What are the principles for distinguishing the security objectives and implementation methods that cloud computing security expansion requires to focus on?
TPG x AIDU | AI leading talent recruitment plan in progress!
数据库系统概论-第一章绪论【概念模型、层次模型和三级模式(外模式、模式、内模式)】
高等數學---第八章多元函數微分學1
FCOS3D label assignment
Excerpt from "misogyny: female disgust in Japan"
Best practice | using Tencent cloud AI willingness to audit as the escort of telephone compliance
PostgreSQL array type, each splice
requires php ~7.1 -> your PHP version (7.0.18) does not satisfy that requirement
AutoCAD - how to input angle dimensions and CAD diameter symbols greater than 180 degrees?
Laravel5 call to undefined function openssl cipher iv length() 报错 PHP7开启OpenSSL扩展失败
Redis 核心数据结构 & Redis 6 新特性详
請問,在使用flink sql sink數據到kafka的時候出現執行成功,但是kafka裏面沒有數