当前位置:网站首页>Pycharm code specification tool flake8
Pycharm code specification tool flake8
2022-07-26 07:56:00 【Blue of Picchu】
List of articles
Code specification
- With the development of computer language , Code specification is something we should pay more attention to when writing code , When we use pycharm When writing code , We can borrow pycharm Tools flake8 Do code specification checks , So that the code specification meets the standard requirements .
- Code specifications can be reduced bug, Help code review , Reduce maintenance costs , More importantly, in large projects , We all use a common set of code standards , This can improve the cooperation efficiency between teams .
One 、flake8 What is it? ?
Flake8 It is an auxiliary detection Python Is the code a standardized tool .
Two 、pycharm Installation and use in flake8
1. install
terminal The input terminal :pip install flake8
2.flake8 Tool use
- stay terminal Used in terminal
flake8 ( File path )
3、 ... and 、 Common errors in code specification
- Running on the terminal will show the problem of code format , You can modify and improve the code according to the prompts .
1. Missing space after comma
- 24:12: E231 missing whitespace after ‘,’
resolvent : In the 24 That's ok 12 Add a semicolon to the column
2. Only one blank line is needed at the end
- 36:30: W292 no newline at end of file
- 13:1: W391 blank line at end of file
resolvent : Add a blank line at the end
3. The sentence ends with a semicolon
- 11:15: E703 statement ends with a semicolon
resolvent : Find the end of the sentence , Delete the extra semicolon
summary
for example : The above is the code specification tool flake8 The content of , This article only briefly introduces flake8 stay pycharm Installation and use of ,flake8 It solves the problem that we can deal with code specification quickly and conveniently .
边栏推荐
- Tensorflow learning diary tflearn
- 总结软件测试岗的那些常见高频面试题
- LeetCode剑指offer专项(一)整数
- QT listview add controls and pictures
- Now developers are beginning to do testing. Will there be no software testers in the future?
- Audio and video learning (10) -- PS streaming
- Ethernet switching security
- HOT100 hash
- 给项目日志加上traceid
- OVSDB
猜你喜欢

Open source management system based on ThinkPHP

ARIMA model for time series analysis and prediction

VScode无法启动问题解决思路

JMeter性能测试之使用CSV文件参数化

Wrong Addition

table 固定特定行

WCF deployed on IIS

Unity Metaverse(二)、Mixamo & Animator 混合树与动画融合

Simulation of transfer function step response output of botu PLC first-order lag system (SCL)

基于Thinkphp的开源管理系统
随机推荐
"Door lock" ignites a heated discussion on the safety of living alone. The new poster picture is suffocating
Sort sort IP addresses
Shardingsphere data slicing
音视频学习(十)——ps流
Solution to the problem of token loss when microservice feign is called
Interview question set
2019 ZTE touyue · model compression scheme
ARIMA model for time series analysis and prediction
Use js to count the number of occurrences of each string in the string array, and format it into an object array.
记一次路由器频繁掉线问题的分析、解决与发展
OVS underlying implementation principle
Polymorphism, final and interface
From boosting to lamdamart
MMOE multi-objective modeling
PyTorch
Regular expression rules and common regular expressions
C language keyword extern
Open source management system based on ThinkPHP
一文掌握mysql数据库审计特点、实现方案及审计插件部署教程
PXE efficient batch network installation