cubicweb/server/hook.py
changeset 12578 d06a2feae373
parent 12567 26744ad37953
child 12621 092d201a7c17
equal deleted inserted replaced
12576:3aa0c203747c 12578:d06a2feae373
   437 class match_rtype(ExpectedValuePredicate):
   437 class match_rtype(ExpectedValuePredicate):
   438     """accept if the relation type is found in expected ones. Optional
   438     """accept if the relation type is found in expected ones. Optional
   439     named parameters `frometypes` and `toetypes` can be used to restrict
   439     named parameters `frometypes` and `toetypes` can be used to restrict
   440     target subject and/or object entity types of the relation.
   440     target subject and/or object entity types of the relation.
   441 
   441 
   442     :param \*expected: possible relation types
   442     :param *expected: possible relation types
   443     :param frometypes: candidate entity types as subject of relation
   443     :param frometypes: candidate entity types as subject of relation
   444     :param toetypes: candidate entity types as object of relation
   444     :param toetypes: candidate entity types as object of relation
   445     """
   445     """
   446     def __init__(self, *expected, **more):
   446     def __init__(self, *expected, **more):
   447         self.expected = expected
   447         self.expected = expected