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 3E493158021 for ; Mon, 26 Dec 2022 17:28:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 124E1E0951; Mon, 26 Dec 2022 17:28:07 +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 CA908E0952 for ; Mon, 26 Dec 2022 17:28:06 +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 A1F5A3410D1 for ; Mon, 26 Dec 2022 17:28:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E614D7E7 for ; Mon, 26 Dec 2022 17:28: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: <1672075643.9806022b0ca911da412c47227f0ca031783a09b9.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcore:master commit in: src/pkgcore/ebuild/ X-VCS-Repository: proj/pkgcore/pkgcore X-VCS-Files: src/pkgcore/ebuild/domain.py X-VCS-Directories: src/pkgcore/ebuild/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 9806022b0ca911da412c47227f0ca031783a09b9 X-VCS-Branch: master Date: Mon, 26 Dec 2022 17:28: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: 4af0553c-d709-429c-9487-2e74c3c2abdf X-Archives-Hash: ea6dae24775c2d2965ae8495c8814ba8 commit: 9806022b0ca911da412c47227f0ca031783a09b9 Author: Brian Harring gmail com> AuthorDate: Sun Dec 25 21:20:57 2022 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Mon Dec 26 17:27:23 2022 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=9806022b Simplify some class attribute building. Signed-off-by: Brian Harring gmail.com> Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcore/ebuild/domain.py | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/pkgcore/ebuild/domain.py b/src/pkgcore/ebuild/domain.py index 15f2b2179..4e33e0fc9 100644 --- a/src/pkgcore/ebuild/domain.py +++ b/src/pkgcore/ebuild/domain.py @@ -188,25 +188,25 @@ def load_property( class domain(config_domain): # XXX ouch, verify this crap and add defaults and stuff - _types = { - "profile": "ref:profile", - "repos": "lazy_refs:repo", - "vdb": "lazy_refs:repo", - } - for _thing in ( - "root", - "config_dir", - "CHOST", - "CBUILD", - "CTARGET", - "CFLAGS", - "PATH", - "PORTAGE_TMPDIR", - "DISTCC_PATH", - "DISTCC_DIR", - "CCACHE_DIR", - ): - _types[_thing] = "str" + _types = dict.fromkeys( + ( + "root", + "config_dir", + "CHOST", + "CBUILD", + "CTARGET", + "CFLAGS", + "PATH", + "PORTAGE_TMPDIR", + "DISTCC_PATH", + "DISTCC_DIR", + "CCACHE_DIR", + ), + "str", + ) + _types["profile"] = "ref:profile" + _types["repos"] = "lazy_refs:repo" + _types["vdb"] = "lazy_refs:repo" # TODO this is missing defaults pkgcore_config_type = ConfigHint( @@ -216,7 +216,7 @@ class domain(config_domain): allow_unknowns=True, ) - del _types, _thing + del _types def __init__( self,