当前位置:网站首页>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 .
边栏推荐
- Shardingsphere data slicing
- How to ensure the double write consistency between cache and database?
- Network trimming: a data driven neuron pruning approach towards efficient deep architectures paper translation / Notes
- 一文掌握mysql数据库审计特点、实现方案及审计插件部署教程
- 总结软件测试岗的那些常见高频面试题
- NFS service and Samba service deployment
- Selenium: detailed explanation of browser crawler use (I)
- VScode无法启动问题解决思路
- Network ()
- 系统架构&微服务
猜你喜欢

C # use log4net to record logs (basic chapter)

程序环境和预处理

Now developers are beginning to do testing. Will there be no software testers in the future?

System architecture & microservices

Anaconda 中安装 百度飞浆Paddle 深度学习框架 教程

元宇宙基础设施:WEB 3.0 chain33 优势分析

PXE efficient batch network installation

Wrong Addition

Logical volume management (LVM)

shardingjdbc踩坑记录
随机推荐
Using ordered dictionary to copy pcap files
动态性能视图概述
Wrong Addition
Machine learning related competition website
Network ()
OVSDB
Shardingjdbc pit record
Polymorphism, final and interface
什么是消息订阅和发布?
在线问题反馈模块实战(十四):实现在线答疑功能
The bigger the project is, the bigger it is. This is how I split it
The analysis, solution and development of the problem of router dropping frequently
Common templates for web development
Now developers are beginning to do testing. Will there be no software testers in the future?
The difference between abstract classes and interfaces
PHP environment deployment
JWT quick start
C语言关键字extern
20220209 create a basic Servlet
Jmeter性能测试之使用存储响应内容到文件监听器