Message ID | ri6edibkj6n.fsf@suse.cz |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2032742vqb; Tue, 3 Oct 2023 05:03:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDhqvlYlQnuYJb662K28YDBk99Jo1/TWXT6f4IObG3W0JaBfBnaNA4mUSDUxRlwEBgMrxN X-Received: by 2002:a05:6402:515:b0:533:9df5:ede with SMTP id m21-20020a056402051500b005339df50edemr12042900edv.14.1696334606871; Tue, 03 Oct 2023 05:03:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696334606; cv=none; d=google.com; s=arc-20160816; b=dG5Ixvs+UgduA/AX6Znjp3zaPh91h9H/MkB0lKfw2QTSvFgKKiS1DppKT9GaRW7eJX KC3CPU9cUYta7IDOsylSdR9bwGYVCkjhthlHrMJ5Gh7TntfqNoDPoZLDXS4JQXchkhnD DD1NhXp7K86LscsxgCvki6FCCcILTqPfdiJxoNc+l5WBtbCQpRboQTvZU9XcVEjfk9KP io/f1+WwUPOmbTZ96SpOHnbxMtn9jF+bT1REX291OqT4bwB802l9OUPHBT/lQY56wHAV lYeWPUPqnP5Tt1s4Rg8b18OxaykjEIqG8kBXLKYevAXZIJFK3v01MpgR8I6Dnxnf1Nu5 7Xmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:user-agent:subject:cc:to:from :dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=HWLTALULDXh8lDXiwOJ26tYSqU3v5NzTHFg7w9UIcEQ=; fh=PeUtuaUofQC/0dGVA+uqpgccg1tlbczNMCBXrue/29w=; b=O51oqj7p4zTUoPrfBq821sVUUb4689L1jtVT/4ENazbAUtbk2eaBgWeu5N5B7ZZ5pk EvJKH+8jzJzrW5Y1krVfXjLrH195WcT3Jumg1wQFsbWZ3xNPjwjGBtTuwM3yjrxbRr5S 5G6/+6MdN2SmlD3+nJ8LEmTvD6rI0iPblO2ZcALqcJLR7Vuq2M4/IGx0Q+r4gOYjlFDK FOe/vUF6fssbCuQXwf+IIZb7Db+aWA4ZAb4F5dYUPqy6VaFiG17f6G1JKw0elYU2jxU4 ZiWpECkUM2mTSWeBDp+NX4BBhYeTktncGf7DUZ5HTo1qc2oAQmZZV4cznmkus4B+Jt8i XrQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=SXY7pdHh; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=3Nv44c3+; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id r19-20020a056402035300b00528497fa1dfsi518006edw.584.2023.10.03.05.03.26 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 05:03:26 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=SXY7pdHh; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=3Nv44c3+; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8676E38582B7 for <ouuuleilei@gmail.com>; Tue, 3 Oct 2023 12:03:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id AB7973858D33 for <gcc-patches@gcc.gnu.org>; Tue, 3 Oct 2023 12:02:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB7973858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail 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 A82932188C for <gcc-patches@gcc.gnu.org>; Tue, 3 Oct 2023 12:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1696334560; 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; bh=HWLTALULDXh8lDXiwOJ26tYSqU3v5NzTHFg7w9UIcEQ=; b=SXY7pdHhbt1LWH5l3Wh/VBYYVuxvKY3EzrVK9sw1FTplehT/TNYQgmdxQdA7fDV/BydmRh jtLN7cy6fVFzu8I+2r+a0IptfU7mhrk1zFHVz4Zo8Il8aTehdCB+n3lxqlRzAWOH86lZp2 pHUYNb2Np7mWKaF7k2qul0M7A6YLgPk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1696334560; 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; bh=HWLTALULDXh8lDXiwOJ26tYSqU3v5NzTHFg7w9UIcEQ=; b=3Nv44c3+rg+3lIxnV5Qor6PjZCYhjTa4/WbgSJ5cYqqbBIG4S4GSGwFmH4nan4Nr1wvBrD yGTHW2TuDJeHWRDQ== 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 9D65E132D4 for <gcc-patches@gcc.gnu.org>; Tue, 3 Oct 2023 12:02:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QRdqJuACHGWBEAAAMHmgww (envelope-from <mjambor@suse.cz>) for <gcc-patches@gcc.gnu.org>; Tue, 03 Oct 2023 12:02:40 +0000 From: Martin Jambor <mjambor@suse.cz> To: GCC Patches <gcc-patches@gcc.gnu.org> Cc: Subject: [PATCH] contrib/mklog.py: Fix issues reported by flake8 User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/29.1 (x86_64-suse-linux-gnu) Date: Tue, 03 Oct 2023 14:02:40 +0200 Message-ID: <ri6edibkj6n.fsf@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778735756900958895 X-GMAIL-MSGID: 1778735756900958895 |
Series |
contrib/mklog.py: Fix issues reported by flake8
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Martin Jambor
Oct. 3, 2023, 12:02 p.m. UTC
Hi, the testing infrastructure built by Martin Liška contains checking a few python scripts in contrib witha tool flake8. That tool recently complains that: contrib/mklog.py:360:45: E711 comparison to None should be 'if cond is None:' contrib/mklog.py:362:1: E305 expected 2 blank lines after class or function definition, found 1 I'd like to silence these with the following, hopefully trivial, changes. However, I have only tested the changes by running flake8 again and running ./contrib/mklog.py --help. Is this good for trunk? (Or should I stop using flake8 instead?) Thanks, Martin contrib/ChangeLog: 2023-10-03 Martin Jambor <mjambor@suse.cz> * mklog.py (skip_line_in_changelog): Compare to None using is instead of ==, add an extra newline after the function. --- contrib/mklog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Tue, Oct 03, 2023 at 02:02:40PM +0200, Martin Jambor wrote: > Hi, > > the testing infrastructure built by Martin Liška contains checking a > few python scripts in contrib witha tool flake8. That tool recently > complains that: > > contrib/mklog.py:360:45: E711 comparison to None should be 'if cond is None:' > contrib/mklog.py:362:1: E305 expected 2 blank lines after class or function definition, found 1 > > I'd like to silence these with the following, hopefully trivial, > changes. However, I have only tested the changes by running flake8 > again and running ./contrib/mklog.py --help. > > Is this good for trunk? (Or should I stop using flake8 instead?) > > Thanks, > > Martin > > > contrib/ChangeLog: > > 2023-10-03 Martin Jambor <mjambor@suse.cz> > > * mklog.py (skip_line_in_changelog): Compare to None using is instead > of ==, add an extra newline after the function. Ok, thanks. Jakub
diff --git a/contrib/mklog.py b/contrib/mklog.py index effe5aa1ca5..1c2c3216e9e 100755 --- a/contrib/mklog.py +++ b/contrib/mklog.py @@ -357,7 +357,8 @@ def update_copyright(data): def skip_line_in_changelog(line): - return FIRST_LINE_OF_END_RE.match(line) == None + return FIRST_LINE_OF_END_RE.match(line) is None + if __name__ == '__main__': extra_args = os.getenv('GCC_MKLOG_ARGS')