From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +d0gDu1TfWp4ECIAWB0awg (envelope-from ) for ; Thu, 13 Aug 2026 01:19:41 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=i9XcVfDk; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=PMlk268m; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=HlmhJEMI; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JcxPU/sI; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 338BF1E166; Thu, 13 Aug 2026 01:19:41 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9D9771E033 for ; Thu, 13 Aug 2026 01:19:40 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 527BC4BA7984 for ; Thu, 13 Aug 2026 05:19:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 527BC4BA7984 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=i9XcVfDk; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=PMlk268m; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=HlmhJEMI; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JcxPU/sI Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 00E364BA23F3 for ; Thu, 13 Aug 2026 05:19:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00E364BA23F3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 00E364BA23F3 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786598356; cv=none; b=DCjnyvQ8POpH+fEsT/VnZvfLyRgvQUS3kzveVQPtXXUt8R5zmk4xn6Y+xVawntk04mlDRPTA4lLG2DC+Rvi3EW7jGG8esbiOcIA342btJfGcqOHtupvRlLJZppCT9rSQLqtNRB7no6QoZFQgeOTwTikrE9l2U+x0nzqs03GZb2U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786598356; c=relaxed/simple; bh=zEwU2L4ZtmLXkZth49KcMliXG3/ZX+QbDQIebbFmPKc=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=lgr16OFYTsHa3/Voa2ydjm+4x8OOxgubqp1hCDpVByTMgkuapxg1vCAMiO4eLF/jS4o+KI5zugt1pfKY6FkidAu1BSGM58cG4COChlUlPFR14cNRLJxyTqDiq9fBmfj3Yzr22uh8hm79YnCtm9xBO1oQ4Dw6hkfYK9WXQUPKTYc= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=i9XcVfDk; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=PMlk268m; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=HlmhJEMI; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JcxPU/sI DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00E364BA23F3 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D10193E44; Thu, 13 Aug 2026 05:19:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1786598351; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pf6DsnxBzhdMPY6i2wveKyhGlhZ6wXn7sHlyrjBvC+M=; b=i9XcVfDkMxNnEcVGC0QY3N0MnLWCIhAy8k1/J1yfjUbHTbCXfieeA7U45aI3/fdGjUNyVy hPr4MKeEwq0ZZD1NKHpZ67uZ7wT9oGIWE0KOqN48j5ppXhfr1QqIjpRp4ElMnYV6tjNfgv izTxDTv36kcV1FFHX7cM1PCA2HiaNCU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1786598351; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pf6DsnxBzhdMPY6i2wveKyhGlhZ6wXn7sHlyrjBvC+M=; b=PMlk268mxTCMacOJz3aloB9KVAd62vpIg6e2tA+uMv5bwDkkqNPjxo5F5iBP5uCk/eRYBx 4BV7EJXfrkPx9rDA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1786598346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pf6DsnxBzhdMPY6i2wveKyhGlhZ6wXn7sHlyrjBvC+M=; b=HlmhJEMIh4KcnYZ/skY4W6XWbFefdYVp3dfBDXMYKA8ohQmtZEjp7vXpCldvgVeVHZ9rO9 TsrvTMfeKxopnIm7LREMSOOGDNff3TvBpgS4/QEd9YRiOTBh7lIBNPsaOY/oADRH4KF0By FdY1Cl7xacNO4jDCMxyzHA96URHBiug= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1786598346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pf6DsnxBzhdMPY6i2wveKyhGlhZ6wXn7sHlyrjBvC+M=; b=JcxPU/sIrKsW21JjOyI7m+pmD9vNwNoVdpqrZxNLGweCNyf53UCryY1MA/C1vO8HJMwJsK VVV4QjCmCSSUa2Dg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B97C077C50; Thu, 13 Aug 2026 05:19:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4FZTK8pTfWpoUQAAD6G6ig (envelope-from ); Thu, 13 Aug 2026 05:19:06 +0000 Message-ID: <40fafdb9-c565-4873-b6a1-16e247e88366@suse.de> Date: Thu, 13 Aug 2026 07:19:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/5] [pre-commit] Run flake8 for gdb/gdb-gdb.py.in To: Simon Marchi , gdb-patches@sourceware.org References: <20260720125056.1373177-1-tdevries@suse.de> <20260720125056.1373177-4-tdevries@suse.de> Content-Language: en-US From: Tom de Vries In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,imap1.dmz-prg2.suse.org:helo] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 8/12/26 8:15 PM, Simon Marchi wrote: > On 7/20/26 8:50 AM, Tom de Vries wrote: >> When running the pre-commit hooks for gdb/gdb-gdb.py.in: >> ... >> $ pre-commit run --files gdb/gdb-gdb.py.in >> black...................................................................Passed >> flake8..............................................(no files to check)Skipped >> isort...................................................................Passed >> codespell...............................................................Passed >> tclint..............................................(no files to check)Skipped >> check-include-guards................................(no files to check)Skipped >> check-gnu-style.....................................(no files to check)Skipped >> - hook id: check-gnu-style >> check-whitespace........................................................Passed >> pre-commit-setup........................................................Passed >> check-file-mode.........................................................Passed >> ... >> we see that flake8 is skipped. >> >> The hook setup has a types_or workaround that's supposed to prevent this: >> ... >> - id: flake8 >> types_or: *gdb_python_types >> files: *gdb_python_files >> args: [--config, gdb/setup.cfg] >> ... >> but that doesn't work because flake8's .pre-commit-hooks.yaml doesn't set >> types_or, but types: >> ... >> types: [python] >> ... >> >> So we end up with an effective setting of both types and types_or: >> ... >> types: [python] >> types_or: [file] >> ... >> which both have to be matched, and because gdb/gdb-gdb.py.in doesn't match >> python: >> ... >> $ identify-cli gdb/gdb-gdb.py.in >> ["file", "non-executable", "text"] >> ... >> the file is skipped. >> >> This could be fixed by: >> ... >> - types_or: [file] >> + types: [file] >> ... >> but an isort update setting types_or could reintroduce the same problem. >> >> For robustness, fix this by setting both types and types_or for each python >> hook. >> >> Using the same value for both settings would work: >> ... >> types: [file] >> types_or: [file] >> ... >> because types and types_or have the same effect for list lengths 0 and 1. >> >> But I think it's better to have different anchors to avoid any confusion about >> the and/or behavior, in which case it's more natural to use the actual default >> [] for types_or, and to update the anchor names to reflect that these are the >> default values: >> ... >> types: &types_default [file] >> types_or: &types_or_default [] >> ... > > Are we doing all this just for gdb-gdb.py.in? Yes. > Because it might not need > to be a ".in" file, I don't see any substitution in it (unlike > gdb-gdb.gdb.in). Could we rename it to gdb-gdb.py and use > AC_CONFIG_LINKS on it? Would that simplify things? I've given the rename a try: ( https://sourceware.org/pipermail/gdb-patches/2026-August/229422.html ). Thanks, - Tom