pycharm warn:inline comment should start with '# ;block comment should start with ‘# ’【原因及解决方案】

两个警告的信息
erro:inline comment should start with '#
block comment should start with ‘# ’

1.格式出错的操作代码示例
在这里插入图片描述
格式出错的原因是:没有将注释单独放在一行

1.1正确的操作代码示例
pycharm warn:inline comment should start with '# ;block comment should start with ‘# ’【原因及解决方案】_第1张图片

2.warning的操作示例代码
pycharm warn:inline comment should start with '# ;block comment should start with ‘# ’【原因及解决方案】_第2张图片
warning原因:以#开头没有加一个空格

2.1正确的操作代码示例
pycharm warn:inline comment should start with '# ;block comment should start with ‘# ’【原因及解决方案】_第3张图片

你可能感兴趣的:(pycharm warn:inline comment should start with '# ;block comment should start with ‘# ’【原因及解决方案】)