python-pycharm-Triple double-quoted strings should be used for docstrings.

文章目录

  • 问题
  • 解决方案
    • 自动解决
    • 手动解决

问题

pycharm 在注释时,提示Triple double-quoted strings should be used for docstrings.
意思是:文档注释,应该用三个双引号。
也就是,它更推荐用双引号注释,而不是单引号
python-pycharm-Triple double-quoted strings should be used for docstrings._第1张图片

解决方案

自动解决

将光标放在单引号上,出现小灯,再按下,出现“convert …”,点击即可自动转为双引号
python-pycharm-Triple double-quoted strings should be used for docstrings._第2张图片
python-pycharm-Triple double-quoted strings should be used for docstrings._第3张图片

手动解决

手动将单引号改为双引号

你可能感兴趣的:(pycharm,python)