commit:     651b2aa75d57bac71a045dc5f3533d736ee90552
Author:     Brian Harring <ferringb <AT> gmail <DOT> com>
AuthorDate: Sat Nov 22 09:56:23 2025 +0000
Commit:     Brian Harring <ferringb <AT> gmail <DOT> com>
CommitDate: Sat Nov 22 18:19:27 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=651b2aa7

chore: mark Result as abstract and annotate desc

This is both for enforcement of implementation expectations,
and for IDE/mypy.

Signed-off-by: Brian Harring <ferringb <AT> gmail.com>

 src/pkgcheck/results.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/pkgcheck/results.py b/src/pkgcheck/results.py
index 23d639fc..51686b38 100644
--- a/src/pkgcheck/results.py
+++ b/src/pkgcheck/results.py
@@ -1,5 +1,6 @@
 """Base classes for check results."""
 
+import abc
 from functools import total_ordering
 
 from pkgcore.ebuild import cpv
@@ -15,7 +16,7 @@ class InvalidResult(Exception):
 
 
 @total_ordering
-class Result:
+class Result(abc.ABC):
     """Generic report result returned from a check."""
 
     # all results are shown by default
@@ -37,7 +38,8 @@ class Result:
         return f"{self.name}: {self.desc}"
 
     @property
-    def desc(self):
+    @abc.abstractmethod
+    def desc(self) -> str:
         """Result description."""
 
     @property

Reply via email to