当前位置:网站首页>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
边栏推荐
- Excerpt from "misogyny: female disgust in Japan"
- Excuse me, as shown in the figure, the python cloud function prompt uses the pymysql module. What's the matter?
- Excuse me, why is it that there are no consumption messages in redis and they are all piled up in redis? Cerely is used.
- 【AI实战】应用xgboost.XGBRegressor搭建空气质量预测模型(二)
- Realize the IP address home display function and number home query
- Redis 核心数据结构 & Redis 6 新特性详
- Excuse me, when using Flink SQL sink data to Kafka, the execution is successful, but there is no number in Kafka
- Es log error appreciation -limit of total fields
- 数据库系统概论-第一章绪论【概念模型、层次模型和三级模式(外模式、模式、内模式)】
- 为租客提供帮助
猜你喜欢
Help tenants
Use day JS let time (displayed as minutes, hours, days, months, and so on)
Details of redis core data structure & new features of redis 6
Wired network IP address of VMware shared host
Xshell connection server changes key login to password login
Realize the IP address home display function and number home query
"Song of ice and fire" in the eleventh issue of "open source Roundtable" -- how to balance the natural contradiction between open source and security?
docker部署oracle
Take you to master the three-tier architecture (recommended Collection)
UML 顺序图(时序图)
随机推荐
[daily training] 648 Word replacement
Excuse me, as shown in the figure, the python cloud function prompt uses the pymysql module. What's the matter?
How can the PC page call QQ for online chat?
Seven propagation behaviors of transactions
Indoor ROS robot navigation commissioning record (experience in selecting expansion radius)
Redis can only cache? Too out!
What are the principles for distinguishing the security objectives and implementation methods that cloud computing security expansion requires to focus on?
c#利用 TCP 协议建立连接
SSRF vulnerability file pseudo protocol [netding Cup 2018] fakebook1
带你掌握三层架构(建议收藏)
PostgreSQL array type, each splice
Regular expression integer positive integer some basic expressions
Move base parameter analysis and experience summary
Oracle advanced (V) schema solution
The difference between memory overflow and memory leak
Interface automation test - solution of data dependency between interfaces
566. 重塑矩阵
Hands on Teaching: XML modeling
2022-7-6 sigurg is used to receive external data. I don't know why it can't be printed out
postgresql array类型,每一项拼接