From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 2A7993858D35 for ; Fri, 21 Jul 2023 10:39:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A7993858D35 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-out2.suse.de (Postfix) with ESMTPS id 18B481F897; Fri, 21 Jul 2023 10:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1689935953; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sWTPNeQ9LqAGa8+vDVx6B6D/5+dkG30bD6KYKgkFz9E=; b=rQlcplMVbuBGVVu54g55WIGjn/rEv9NG7MCz/1VQB8OwDZdKIPyaNh9q/6PDmbDJBDGBJ0 IPJA5cTvzdvpwsv3ZX38Mm8fJhUb0N+gf78OPO3zMiQCcgUE/kfRU4ng/AiDHWGV6aCNUc LbpO+ngZc3iYKb3v7PJJZ9sQw+kBOm4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1689935953; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sWTPNeQ9LqAGa8+vDVx6B6D/5+dkG30bD6KYKgkFz9E=; b=sLicWkHaGANwfaSWScQNPeNgqD3eX8mp9UD4CVbH20dfr8TD1Q/VlK9lps2KqaFLFgYgE7 Dq4m8GeheK7tOjAQ== 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 0E382134BA; Fri, 21 Jul 2023 10:39:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sZpBA1FgumR8FQAAMHmgww (envelope-from ); Fri, 21 Jul 2023 10:39:13 +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: <9454E265B6F9538A+tencent_EA11EA4976AD383DED223E7EAF2F66F49009@qq.com> References: <20230712040133.88791-1-lehua.ding@rivai.ai> <9454E265B6F9538A+tencent_EA11EA4976AD383DED223E7EAF2F66F49009@qq.com> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.2 (x86_64-suse-linux-gnu) Date: Fri, 21 Jul 2023 12:39:12 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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, > > > > this patch caused flake8 to complain about contrib/mklog.py: > >  > > $ flake8 contrib/mklog.py > > contrib/mklog.py:377:80: E501 line too long (85 > 79 characters) > > contrib/mklog.py:388:26: E127 continuation line over-indented for visual indent > > contrib/mklog.py:388:36: W605 invalid escape sequence '\s' > > contrib/mklog.py:388:40: W605 invalid escape sequence '\s' > > contrib/mklog.py:388:44: W605 invalid escape sequence '\s' > > contrib/mklog.py:388:47: W605 invalid escape sequence '\|' > > contrib/mklog.py:388:49: W605 invalid escape sequence '\s' > > contrib/mklog.py:388:51: W605 invalid escape sequence '\d' > > contrib/mklog.py:388:54: W605 invalid escape sequence '\s' > > contrib/mklog.py:388:58: W605 invalid escape sequence '\-' > >  > > Can you please have a look and ideally fix the issues? > > > Thank you for pointing out this. > I will fix these format errors in another fix patch[1]. Thanks! > I tried to fix the following format error but couldn't > find a way, do you know how to fix this error? > > > contrib/mklog.py:388:26: E127 continuation line over-indented for visual indent I am no python expert but the following seems to work: diff --git a/contrib/mklog.py b/contrib/mklog.py index 26230b9b4f2..2563d19bc99 100755 --- a/contrib/mklog.py +++ b/contrib/mklog.py @@ -384,8 +384,8 @@ if __name__ == '__main__': for line in f: if maybe_diff_log == 1 and line == "---\n": maybe_diff_log = 2 - elif maybe_diff_log == 2 and \ - re.match("\s[^\s]+\s+\|\s\d+\s[+\-]+\n", line): + elif (maybe_diff_log == 2 and + re.match("\s[^\s]+\s+\|\s\d+\s[+\-]+\n", line)): lines += [output, "---\n", line] maybe_diff_log = 3 else: Martin