From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8F0BD158089 for ; Wed, 1 Nov 2023 19:20:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B40C12BC0C6; Wed, 1 Nov 2023 19:20:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 pigeon.gentoo.org (Postfix) with ESMTPS id 5BF662BC0D2 for ; Wed, 1 Nov 2023 19:20:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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.gentoo.org (Postfix) with ESMTPS id 5444E335D0A for ; Wed, 1 Nov 2023 19:20:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 572A912DA for ; Wed, 1 Nov 2023 19:20:03 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1698866383.013b8d678895caf3f66173f6dfd2379c5219d576.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/checks/ X-VCS-Repository: proj/pkgcore/pkgcheck X-VCS-Files: src/pkgcheck/checks/codingstyle.py X-VCS-Directories: src/pkgcheck/checks/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 013b8d678895caf3f66173f6dfd2379c5219d576 X-VCS-Branch: master Date: Wed, 1 Nov 2023 19:20:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4f14fd4e-196a-44b7-b247-97bbde349397 X-Archives-Hash: aae743be86faf17087f58b98ee16800b commit: 013b8d678895caf3f66173f6dfd2379c5219d576 Author: Arthur Zamarin gentoo org> AuthorDate: Wed Nov 1 19:19:43 2023 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Wed Nov 1 19:19:43 2023 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=013b8d67 MissingInherits: add some specials to exclude list Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcheck/checks/codingstyle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pkgcheck/checks/codingstyle.py b/src/pkgcheck/checks/codingstyle.py index 0c33c650..60f1ce98 100644 --- a/src/pkgcheck/checks/codingstyle.py +++ b/src/pkgcheck/checks/codingstyle.py @@ -825,7 +825,7 @@ class InheritsCheck(Check): self.exported.setdefault(name, set()).add(eclass) # collect all @USER_VARIABLEs, which are excluded from MissingInherits - self.user_variables = frozenset( + user_variables = frozenset( { x.name for eclass_obj in self.eclass_cache.values() @@ -833,6 +833,7 @@ class InheritsCheck(Check): if x.user_variable } ) + self.exclude_missing_inherit = user_variables | {"CTARGET", "BUILD_DIR"} # register EAPI-related funcs/cmds to ignore self.eapi_funcs = {} @@ -911,7 +912,7 @@ class InheritsCheck(Check): if node.parent.type == "unset_command": continue if name not in self.eapi_vars[pkg.eapi] | assigned_vars.keys(): - if name in self.user_variables: + if name in self.exclude_missing_inherit: continue lineno, _colno = node.start_point if eclass := self.get_eclass(name, pkg):