[PATCH 4 of 4 seda V2] [entities] Mark DirectLinkIContained adapter as abstract explicitly

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Mar 3 15:54:06 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1488552326 -3600
#      Fri Mar 03 15:45:26 2017 +0100
# Node ID ee7e25394132a083c2a9ecd1fddac9c6b647c67d
# Parent  561541b1288c721b6d2605bea2713318d26a2624
[entities] Mark DirectLinkIContained adapter as abstract explicitly

concret subclasses are built in registration_callback.

diff --git a/cubicweb_seda/entities/__init__.py b/cubicweb_seda/entities/__init__.py
--- a/cubicweb_seda/entities/__init__.py
+++ b/cubicweb_seda/entities/__init__.py
@@ -141,10 +141,12 @@ def rule_type_from_etype(etype):
 
 class DirectLinkIContained(IContained):
     """IContained implementation using a relation that link every contained entities to its parent
     container.
     """
+    __abstract__ = True
+
     @property
     def container(self):
         """Return the container to which this entity belongs, or None."""
         container = self.entity.related('container', entities=True)
         return container and container[0] or None


More information about the saem-devel mailing list