问题描述
strange_function(
# Comments about what this argument does
param_1=True,# Comments about what this argument does
param_2=False,)
黑色将其重新格式化为:
strange_function(
# Comments about what this argument does
param_1=True,)
我想要 param_1
和 param_2
之间的新行,因为这样注释更易读。但黑色消除了这一点。它如何阻止它这样做?
解决方法
你不能。
黑色非常无情,只给你一个旋钮来转动:每行允许多少个字符。