aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gmail.com>2024-01-15 20:05:05 -0800
committerBrian Harring <ferringb@gmail.com>2024-01-23 00:52:08 -0800
commit308379df1a6a6a96b9943ebb8b384eb4ff044f54 (patch)
tree4ea9569cbbcfe80b5b3d174e6e7facd5e21a074d
parentfix: suppress $HOME for tests. (diff)
downloadpkgcore-308379df1a6a6a96b9943ebb8b384eb4ff044f54.tar.gz
pkgcore-308379df1a6a6a96b9943ebb8b384eb4ff044f54.tar.bz2
pkgcore-308379df1a6a6a96b9943ebb8b384eb4ff044f54.zip
refactor: Add missing abstractmethods for ConfiguredTree.
In this case, it's not needed beyond being explicit- the GetAttrProxy redirects _get_categories and such to .raw_repo. Signed-off-by: Brian Harring <ferringb@gmail.com>
-rw-r--r--src/pkgcore/repository/configured.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkgcore/repository/configured.py b/src/pkgcore/repository/configured.py
index 74487d55..2860a59f 100644
--- a/src/pkgcore/repository/configured.py
+++ b/src/pkgcore/repository/configured.py
@@ -6,6 +6,7 @@ __all__ = ("tree",)
from functools import partial
+import snakeoil.klass
from snakeoil.klass import DirProxy, GetAttrProxy
from ..operations.repo import operations_proxy
@@ -48,6 +49,11 @@ class tree(prototype.tree):
# required to override empty pkg_masks inherited from prototype.tree
return self.raw_repo.pkg_masks
+ # add explicit alises to 'show' ABCMeta that the methods are addressed.
+ _get_categories = snakeoil.klass.alias_method("raw_repo._get_categories")
+ _get_packages = snakeoil.klass.alias_method("raw_repo._get_packages")
+ _get_versions = snakeoil.klass.alias_method("raw_repo._get_versions")
+
__getattr__ = GetAttrProxy("raw_repo")
__dir__ = DirProxy("raw_repo")