[hooks] match_rtype and match_rtype_sets don't need to extend match_search_state stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 25 Feb 2010 11:43:11 +0100
branchstable
changeset 4699 8757fca2c308
parent 4698 9bd98fc7ef3d
child 4707 d8206e0d1838
[hooks] match_rtype and match_rtype_sets don't need to extend match_search_state The only method actually used by those 2 classes is __str__ that is defined on ExpectedValueSelector, not match_search_state.
server/hook.py
--- a/server/hook.py	Thu Feb 25 11:40:47 2010 +0100
+++ b/server/hook.py	Thu Feb 25 11:43:11 2010 +0100
@@ -44,7 +44,7 @@
 from logilab.common.logging_ext import set_log_methods
 
 from cubicweb.cwvreg import CWRegistry, VRegistry
-from cubicweb.selectors import (objectify_selector, lltrace, match_search_state,
+from cubicweb.selectors import (objectify_selector, lltrace, ExpectedValueSelector,
                                 implements)
 from cubicweb.appobject import AppObject
 
@@ -134,7 +134,7 @@
         return iter(chain(*self.iterators))
 
 
-class match_rtype(match_search_state):
+class match_rtype(ExpectedValueSelector):
     """accept if parameters specified as initializer arguments are specified
     in named arguments given to the selector
 
@@ -159,7 +159,7 @@
         return 1
 
 
-class match_rtype_sets(match_search_state):
+class match_rtype_sets(ExpectedValueSelector):
     """accept if parameters specified as initializer arguments are specified
     in named arguments given to the selector
     """