【发布时间】:2019-10-01 14:55:08
【问题描述】:
我已经启用了 autopep8 扩展,当我保存文件时它会在我的 VS Code 底部显示渲染,但它不尊重 PEP8 中的换行,无论它有多大。如何启用自动换行?
这是我的 settings.json:
{
"files.trimTrailingWhitespace": true,
"python.formatting.provider": "yapf",
"editor.formatOnSave": true,
"[python]": {
"editor.rulers": [90]
},
}
代码示例:
translated_msg = self.string_parser.receive_a_string_with_or_without_tokens_and_return_it_with_the_proper_values(final_msg)
对不起,长名字的方法,这不是我的错
至少不应该这样吗?
translated_msg = self.string_parser.receive_a_string_with_or_without_tokens_and_return_it_with_the_proper_values(
final_msg
)
【问题讨论】:
标签: python visual-studio-code pep8 autoformatting autoformat