commit:     9806022b0ca911da412c47227f0ca031783a09b9
Author:     Brian Harring <ferringb <AT> gmail <DOT> com>
AuthorDate: Sun Dec 25 21:20:57 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> 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 <ferringb <AT> gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam <AT> 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,

Reply via email to