Hello Lehua, On Fri, Jul 21 2023, Lehua Ding wrote: > Hi Martin, > > > By the way, is there a standard format required for these Python files?
Generally, our Python coding conventions are at https://gcc.gnu.org/codingconventions.html#python > I see that other Python files have similar format error when checked > using flake8. For historic reasons (i.e. Martin Liška set it up that way), we currently use flake8 to check python formatting of contrib/gcc-changelog, contrib/mklog.py and maintainer-scripts/branch_changer.py and use pytest to check contrib/gcc-changelog and contrib/test_mklog.py. That is how I found out. I guess many of the files predate the coding conventions and so don't adhere to them. Patches to fix them are welcome (I guess) but at least we should not regress (I guess). > If so, it feels necessary to configure a git hook on git server to do > this check. Performing more thorough checks on pushed commits is a much larger topic than this thread. FWIW, I would not oppose to checking python scripts that are known to be OK. Martin