当前位置:   article > 正文

爬虫:Spellchecker inspection helps locate typos and misspelling in your code

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

学爬虫,遇到报错:Spellchecker inspection helps locate typos and misspelling in your code,comments and literals, and fix them in one click.
大概是说,拼写检查发现了代码中的拼写错误。

百度了一下,原来是pycharm自带拼写检查的功能,可以选择关闭。打开设置,找到Editor\Cor Scheme\General,选择Typo,右侧Effects的勾点掉。如图。
在这里插入图片描述

除了这个,还有一些奇奇怪怪的问题:

  1. PEP 8 missing whitespace after ‘,’:缺少空格…
  2. PEP 8 no newline at end of file:文件最后缺少新行…
  3. PEP 8 expected 2 blank lines after class or function definition, found 1:类前面需要两行空行…
  4. PEP 8 line too long (142 > 120 characters):行太长…
  5. Function name should be lowercase more… (Ctrl+F1) This inspection checks the PEP8 naming conventions.:函数名要小写…

到这里会发现所有问题都和PEP 8有关, 原来这个是python编码规范,这就是 没仔细学python直接开始爬虫学习的缺点吧。。

PEP 8 官方文档:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/寸_铁/article/detail/829411
推荐阅读
相关标签
  

闽ICP备14008679号