使函数参数格式化为黑色,括号周围不换行

huangapple go评论64阅读模式
英文:

Black make function arguments formatting without new lines around barackets

问题

我想要将函数参数的格式设置为类似于PyCharm的默认格式 - 参见图像。意味着在(后和)前没有换行,所以它看起来不像第二张图片那样。当函数名更可见时,对我来说看起来更清晰。

我想要这样:

使函数参数格式化为黑色,括号周围不换行

想要这样:

使函数参数格式化为黑色,括号周围不换行

英文:

I'd like to format function argumetns in a way similar to the PyCharm default formatting - see image. Meaning no new line after '(' and before ) so it does NOT look like in the second image. It looks cleaner to me when function name is more visible.

I want this:

使函数参数格式化为黑色,括号周围不换行

I do NOT want this:

使函数参数格式化为黑色,括号周围不换行

答案1

得分: 2

黑色是一个极具主观看法的格式化工具,其明确目标是使差异更短并保持一致。

这里是你可以得到的信息。

在撰写时,你唯一可以配置的关于黑色的事情就是行长度。

英文:

Black is a highly opinionated formatter with the stated goal of making diffs shorter and consistent.

This is what you get.

The only thing you can configure for Black, at the time of writing, is the line length.

huangapple
  • 本文由 发表于 2023年2月18日 00:52:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/75487114.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定