【Python+Pycharm】单词底部有波浪线,提示typo in word时 - Go语言中文社区

【Python+Pycharm】单词底部有波浪线,提示typo in word时


在使用IDEA时,代码中单词底部有波浪线,提示typo in word时 
原因:单词拼写检查功能,说明当前拼写有问题, 

解决方式:按照驼峰命名法,重新命名即可 

#########

使用自己的名字当Tag。却发现有个非常不用好的提示。波浪,我浪个你妹。


Typo:In word ‘miyuehu’ less...(Ctrl+F1)

spellchecker inspection helps locate typos and misspelled in your code,comments and literals, and fix them in one click.

我尼玛,不能接受。赶紧度娘,找解决办法。。。

File----Settings
































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


点击 apply 关掉窗口。在看看,波浪提示果然消失了。哈哈~~~



高兴之余。默默。。。看了下這句话的翻译。。。

spellchecker inspection helps locate typos and misspelled in your code,comments and literals, and fix them in one click.

机器翻译出来就是:

拼写检查器检查可以帮助查找拼写错误拼写错误代码、 注释文本 修复它们一次点击


這一看,這个功能挺好的啊!!!每个东西,都有它存在的价值。。。思考。。。动手。。。


耶,有发现啊!!!选中单词,单击鼠标右键,卧槽。




Change to...就不用了。

Save ‘miyuehu’ to dictionary...不就是保存到词典的意思嚒。。。果断点了。在看看,波浪消失了。


至此,波浪终于被解决了,或许這个才是解决办法吧。

#############

驼峰命名法:

https://baike.baidu.com/item/%E9%AA%86%E9%A9%BC%E5%91%BD%E5%90%8D%E6%B3%95/7794053?fromtitle=%E9%A9%BC%E5%B3%B0%E5%91%BD%E5%90%8D%E6%B3%95&fromid=7560610&fr=aladdin

#######################

作为一个pyCharm新手,不得不说这款IDE写Python确实挺舒服。 
不过因为代码风格问题,遇到了function name should be lowercase问题,着实烦人,在这里分享一下解决方案。

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

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

code    sample message
N801    class names should use CapWords convention
N802    function name should be lowercase
N803    argument name should be lowercase
N804    first argument of a classmethod should be named 'cls'
N805    first argument of a method should be named 'self'
N806    variable in function should be lowercase

N811    constant imported as non constant
N812    lowercase imported as non lowercase
N813    camelcase imported as lowercase
N814    camelcase imported as constant


版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/HelloZEX/article/details/80996738
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-02-23 17:23:28
  • 阅读 ( 3046 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢