Pylint的警告(warning)、提示訊息(infomation)等訊息,通常不會影響程式的正常執行,但通常會讓程式碼看起來很不舒服,這些訊息可能包含:
- Missing class docstring pylint(missing-docstring)
- Found indentation with tabs instead of spaces pylint(mixed-indentation)
- Variable name "e1" doesn't conform to snake_case naming style pylint(invalid-name)
- No space allowed after bracket pylint(bad-whitespace)
- Method could be a function pylint(no-self-use)
- Trailing whitespace pylint(trailing-whitespace)
- Constant name "win" doesn't conform to UPPER_CASE naming style pylint(invalid-name)
- ...
在VS Code的setting.json加入"python.linting.pylintArgs": ["--errors-only"]
沒有留言:
張貼留言