From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 343A13858D3C for ; Fri, 21 Jul 2023 11:56:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 343A13858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CE2122189D; Fri, 21 Jul 2023 11:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1689940592; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kf1m1rPo7wHFGTJtm/YQUYI6XgNWON1GyHk7EWdz0m4=; b=JB17jUVVL0eaSG2KYsNk5ViAqTUzep5SXh7fjMilUHhZpJllxsZchiwc+MmpJJNE3Izc63 ng7nCitkaVTR2yA3gImm3ARBdF/GoTylnrQaaoSneLjyXQCEU7i8YK/W9LV6DLfFfrBz1K lwQZQBHhhSmt0w9iGowfmfII8W99w4U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1689940592; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kf1m1rPo7wHFGTJtm/YQUYI6XgNWON1GyHk7EWdz0m4=; b=Izzg/+i2Nqst2VHg17VfG79/Qngx3RFfn91TCJ8LrNfvf9oyl66z6Wg0J/ykXEmNF2wPm7 iOusRYVHm4ayJaAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B4972134BA; Fri, 21 Jul 2023 11:56:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id O9/pKXByumT7PAAAMHmgww (envelope-from ); Fri, 21 Jul 2023 11:56:32 +0000 From: Martin Jambor To: Lehua Ding , gcc-patches Cc: "juzhe.zhong" , jeffreyalaw Subject: Re: [PATCH] mklog: Add --append option to auto add generate ChangeLog to patch file In-Reply-To: <24DB9A3E56C25E7E+tencent_F4D7FF335DC874F561BBCF9C3E766F1FE108@qq.com> References: <20230712040133.88791-1-lehua.ding@rivai.ai> <24DB9A3E56C25E7E+tencent_F4D7FF335DC874F561BBCF9C3E766F1FE108@qq.com> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.2 (x86_64-suse-linux-gnu) Date: Fri, 21 Jul 2023 13:56:32 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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=C5=A1ka 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