当前位置:网站首页>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
边栏推荐
- gvim【三】【_vimrc配置】
- Laravel5 call to undefined function OpenSSL cipher IV length() error php7 failed to open OpenSSL extension
- Beginner XML
- Take you to master the three-tier architecture (recommended Collection)
- ARM Cortex-A9,MCIMX6U7CVM08AD 处理器应用
- Details of redis core data structure & new features of redis 6
- Social responsibility · value co creation, Zhongguancun network security and Information Industry Alliance dialogue, wechat entrepreneur Haitai Fangyuan, chairman Mr. Jiang Haizhou
- 搜索框效果的实现【每日一题】
- Navicat run SQL file import data incomplete or import failed
- Advanced Mathematics - Chapter 8 differential calculus of multivariate functions 1
猜你喜欢
Co create a collaborative ecosystem of software and hardware: the "Joint submission" of graphcore IPU and Baidu PaddlePaddle appeared in mlperf
Build a secure and trusted computing platform based on Kunpeng's native security
Xshell connection server changes key login to password login
TPG x AIDU | AI leading talent recruitment plan in progress!
供应链供需预估-[时间序列]
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
LeetCode简单题分享(20)
2022-7-7 Leetcode 34.在排序数组中查找元素的第一个和最后一个位置
Battle Atlas: 12 scenarios detailing the requirements for container safety construction
2022-7-6 使用SIGURG来接受外带数据,不知道为什么打印不出来
随机推荐
Transferring files between VMware and host
118. 杨辉三角
Hands on Teaching: XML modeling
[high frequency interview questions] difficulty 2.5/5, simple combination of DFS trie template level application questions
. Net core about redis pipeline and transactions
Build a secure and trusted computing platform based on Kunpeng's native security
请问,我kafka 3个分区,flinksql 任务中 写了 join操作,,我怎么单独给join
Sliding rail stepping motor commissioning (national ocean vehicle competition) (STM32 master control)
2022-7-6 beginner redis (I) download, install and run redis under Linux
TPG x AIDU | AI leading talent recruitment plan in progress!
请问,PTS对数据库压测有好方案么?
The meaning of variables starting with underscores in PHP
mysql ”Invalid use of null value“ 解决方法
内存溢出和内存泄漏的区别
THINKPHP框架的优秀开源系统推荐
Leetcode simple question sharing (20)
股票开户首选,炒股交易开户佣金最低网上开户安全吗
Redis 核心数据结构 & Redis 6 新特性详
Excerpt from "misogyny: female disgust in Japan"
2022-7-6 使用SIGURG来接受外带数据,不知道为什么打印不出来