在 Hacker News 上看到 Black 這個幫你處理 Python 程式碼的工具:「Black, the uncompromising Python code formatter, is stable (pypi.org)」。
Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.
然後從 Hacker News 上討論的情況看起來大家都覺得很不錯?好像可以看看能不能拿來用...
另外一個在討論的時候看到學到的東西,是 git blame --ignore-revs-file
這個功能,可以在 git blame
時濾掉某些 commit,剛好拿來過濾 reformatting commit:
Ignore revisions listed in
file
, which must be in the same format as anfsck.skipList
. This option may be repeated, and these files will be processed after any files specified with theblame.ignoreRevsFile
config option. An empty file name,""
, will clear the list of revs from previously processed files.