Python Black,`assert` 语句的奇怪输出

问题描述

自动代码格式化程序 black 将第一个片段更改为第二个片段

def foo():
    result = 1
    assert result == """foo

d,e,f,g 2,h 3,i
j,k,l,m
a,b,c
h 4,h 5
"""
def foo():
    result = 1
    assert (
        result
        == """foo

d,h 5
"""
    )

有什么办法可以改进吗?

我认为上面的代码片段应该看起来像现在的样子。 black输出对我来说毫无意义

Above example in the Black Playground

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)