diff options
author | Brian Harring <ferringb@gmail.com> | 2022-12-25 13:20:57 -0800 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2022-12-26 19:27:23 +0200 |
commit | 9806022b0ca911da412c47227f0ca031783a09b9 (patch) | |
tree | 01d9187832bb6e71d589a4edfc8f9ebfab51ca80 /src | |
parent | Rename domain.pkg_operations to domain.get_pkg_operations (diff) | |
download | pkgcore-9806022b0ca911da412c47227f0ca031783a09b9.tar.gz pkgcore-9806022b0ca911da412c47227f0ca031783a09b9.tar.bz2 pkgcore-9806022b0ca911da412c47227f0ca031783a09b9.zip |
Simplify some class attribute building.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pkgcore/ebuild/domain.py | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/pkgcore/ebuild/domain.py b/src/pkgcore/ebuild/domain.py index 15f2b217..4e33e0fc 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, |