flake8插件禁止换行反斜杠
flake8-broken-line的Python项目详细描述
薄片8折线
不要越界!
安装
pip install flake8-broken-line
代码示例
我们用这个插件检查的东西:
# String line breaks, use `()` or `"""` instead:some_string='first line\second line'# Use a single line, `()`, or new variables instead:if1==1and \ 2==2:print('Do not do that!')# Do not reimplement chaining:some_object \ .call_method() \ .call_other() \ .finalize()
错误代码
Error code | Description |
---|---|
N400 | Found backslash that is used for line breaking |
许可证
麻省理工学院。