Pycharm报的一些Python语法错误

Pycharm报的一些Python语法错误

1、PEP8:Expected 2 blank less:found 1

意思是:类和上面的行要间隔两行,现在只有一行

解决办法: 间隔2行

2、Remove redundant parentheses

意思是:删除多余的括号

解决:删掉外面括号即可

3、PEP8:whitespace before ':'

意思:语句和:不能有空格

解决:把空格删除

4、 PEP 8: blank line at end of file

意思:文件尾部没有新起一行

解决: 光标移到最后回车即可。

PEP 8 coding style violation 的告警ID查看 https://pep8.readthedocs.io/en/latest/intro.html#error-codes

PEP 8 naming convention violation 的告警ID查看 https://pypi.org/project/pep8-naming/

5、Function name should be lowercase less

Function name should be lowercase less... (Ctrl+F1)

Inspection info: This inspection checks the PEP8 naming conventions.

函数命名问题

相关推荐
前端精髓1 天前
结构化输出with_structured_output(抽卡)
python·langchain
尹人入圣1 天前
目前热门的IP驱动产业新场景新工具
网络·python·网络协议·tcp/ip
Nuanyt1 天前
Agent 学习笔记(下篇三):上线工程、进阶选择与操作界面(Stage 7 / 7.5 / 8 + 延伸路线)
笔记·python·学习·memory·aiagent·harness
吴卫斌1 天前
定投ETF实战指南(四):行业/主题ETF——定投的“进攻端“
开发语言·python·股票·量化
2601_967987371 天前
Python——入门级(定义功能def函数)
python·函数·可变参数·默认参数·关键字参数
专注仿真1 天前
梯度提升类(XFBoost)算法详解与代码实例
开发语言·人工智能·python·算法·大模型训练·控制算法
外收内放1 天前
Python基础语法练习题(75)
开发语言·python·学习
黑十1 天前
PyTorch 报 “no CUDA GPUs are available“ 怎么办?3 步排查
服务器·网络·人工智能·pytorch·python
threelab1 天前
开源图片去水印代码
python
taller_20002 天前
【012】数据类型入门: Excel 数据到 Python 值的转换
python·excel·pie·py