python

作者: IBM_LELE | 来源:发表于2018-09-16 19:16 被阅读0次

1.快捷键

ctrl+d 复制一行

ctrl+y 删除一行

shift+回车 换行

ctrl+/ 批量注释

ctrl+/ 取消注释

ctrl+"-" 折叠

ctrl+"+" 打开

ctrl+shift+"-" 全部折叠

ctrl+shift+"+" 全部打开

2.# TODO 记录要做的事情

3.调试

F8  逐步进行

F7 进入

F9 进入下一个断点

4.缩进

Tab

Shift+Tab

5.问题

A.function name should be lowercase

File –>Settings–>Editor–>Inspections–>Python–>PEP 8 naming convention violation

在右下角有一个Ignored errors列表控件,添加 

N802 

N803 

N806

B.单词底部有波浪线,提示typo in word时

把Spelling typo勾选去掉(禁用单词拼写检查)

C.indentation is not a multiple of four是什么错误

压痕不是4的倍数

D.PEP 8: too many blank lines (2)

将鼠标移到提示的地方,按alt+Enter,选择忽略(Ignore)这个错误即好。

E.Unnecessary backslash in expression.

F.PEP 8: continuation line over-indented for visual indent

将鼠标移到提示的地方,按alt+Enter,选择忽略(Ignore)这个错误即好。

G.Too broad exception clause” warning in PyCharm

在try:语句前加入:

J.line too long (82 > 79 characters)

在 加入  E501

Z.去除pycharm的warning提示类的波浪线

找到setting选项中的Editor的Inspections,打开Python选项夹将其中所有的PEP8选项的对勾去除

(用于去除def函数命名的检查和import时from的提示);

找到setting选项中的Editor的Inspections,去除spelling中的typo选项的对勾。

(用于出去部分变量命名的问题);

找到setting选项中的Editor的Color Scheme,在general选项点击Errors and Warnings,

将其中的Weak Warning的对勾去除。(用于去除除了2之外其他变量命名的问题)

相关文章

网友评论

      本文标题:python

      本文链接:https://www.haomeiwen.com/subject/hvwzgftx.html