报错如下图:
解决方法一:
鼠标移至报错处,按住Alt+enter键,选择ignore errors like this
方法二:找到设置File - Settings…… - Editor - Inspections中找到PEP8 coding style violation,在右下角ignore error中添加报错id
附件:
或者警告id地址:http://pep8.readthedocs.io/en/latest/intro.html#configuration
code | sample message |
---|---|
E1 | Indentation |
E101 | indentation contains mixed spaces and tabs |
E111 | indentation is not a multiple of four |
E112 | expected an indented block |
E113 | unexpected indentation |
E114 | indentation is not a multiple of four (comment) |
E115 | expected an indented block (comment) |
E116 | unexpected indentation (comment) |
E121 (*^) | continuation line under-indented for hanging indent |
E122 (^) | continuation line missing indentation or outdented |
E123 (*) | closing bracket does not m |