Fully agree with this proposal—it will greatly improve consistency and reduce unnecessary review noise. It might be safer to pin a specific Black version in Spotless to ensure consistent formatting.
Hongzhi Gao [email protected] 原始邮件 发件人:Haonan Hou <[email protected]> 发件时间:2026年4月13日 09:53 收件人:dev <[email protected]> 主题:[DISCUSS] Add Spotless + Black for Python formatting Hi all, I would like to start a discussion about adding Python formatting with Spotless + Black in the python module. Currently, both the Java and C++ modules already use Spotless for code formatting. I think it may make sense to align the Python module with the same workflow. The current proposal is to use spotless-maven-plugin in python/pom.xml, use black to format regular Python files (*.py), and exclude Cython-related files such as *.pyx and *.pxd for now, since Black does not handle Cython syntax well. This should help keep Python code style consistent and reduce formatting-related review noise. I have opened a PR for this here: https://github.com/apache/tsfile/pull/770 Any thoughts on whether we should adopt this? Best, Haonan Hou
