Pycharm常见解决办法

版权声明:苍生苦难,不知伊于胡底 https://blog.csdn.net/qq_40527086/article/details/84261544

Pycharm常见解决办法

错误信息1:(Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click.)

  • 拼写检查有助于查找代码中的拼写错误、注释和文字,并在一次单击中修复它们。
  • 解决:ctrl+A+L法/关闭拼写检查
    选中单词 - 右键 - spelling - save to project-level dictionary

错误信息2:This inspection detects shadowing names defined in outer scopes.

  • 检查到波浪处的单词已在函数外部定义。
  • 解决:使用global关键字或nonlocal 关键字或改名

错误信息3:Variable in function should be lowercase.

  • 函数中的变量应该是小写的。
  • 解决:换成小写,或者更改设置
    File - Settings - Editor - Inspections - Python - PEP 8 naming convention violation - ignored errors中添加N802\N803\N806

需要遵守PEP8规则

快乐待参考

This inspection highlights redundant parentheses in statements

此检查突出了语句中的冗余括号。

猜你喜欢

转载自blog.csdn.net/qq_40527086/article/details/84261544
今日推荐