summary refs log tree commit diff stats
path: root/abdl/predicates.py
diff options
context:
space:
mode:
Diffstat (limited to 'abdl/predicates.py')
-rw-r--r--abdl/predicates.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/abdl/predicates.py b/abdl/predicates.py
index 4df9cdf..57fb976 100644
--- a/abdl/predicates.py
+++ b/abdl/predicates.py
@@ -21,6 +21,9 @@ See ``abdl.predicates.Predicate`` and the language reference for details.
 
 # pylint: disable=too-few-public-methods
 
+import warnings
+import abdl.feature
+
 class Predicate:
     """A predicate checks if an object is accepted in an ABDL expression.
     """
@@ -89,6 +92,8 @@ def _to_predicate(obj):
         return obj
     if isinstance(obj, tuple):
         return Union(obj)
+    if isinstance(obj, type) and issubclass(obj, Predicate):
+        warnings.warn("deprecated", abdl.feature.PredicateTypePredicate)
     # I don't know if anyone relies on the old behaviour of passing the thing directly to isinstance
     # but this lets the exceptions be raised almost exactly like before
     return IsInstance(obj)