我正在使用 black==20.8b1
。
我有一个长字符串,例如:
return f"{self.name}, a {adjective.to_name()} {kin_string}{self._type.to_name()} who works for the {target.get_relationship_target_string()}."
I run:
$ black -l 80 . -t py38
All done! ✨ ✨
2 files left unchanged.
为什么字符串没有换行?我以为
black
现在支持换行字符串了(基于github上的问题)。
--experimental-string-processing
现在:--preview
。当运行时搭配使用--experimental-string-processing
:<string>:12: Deprecated:
experimental string processinghas been included in
previewand deprecated. Use
previewinstead.
的话,会出现这样的提示:<string>
:12:已弃用:experimental string processing
已被包含在preview
中并被弃用。请改用preview
。 - Taylor D. Edmiston