equal
deleted
inserted
replaced
353 """ |
353 """ |
354 def __init__(self, *expected, **more): |
354 def __init__(self, *expected, **more): |
355 self.expected = expected |
355 self.expected = expected |
356 self.frometypes = more.pop('frometypes', None) |
356 self.frometypes = more.pop('frometypes', None) |
357 self.toetypes = more.pop('toetypes', None) |
357 self.toetypes = more.pop('toetypes', None) |
|
358 assert not more, "unexpected kwargs in match_rtype: %s" % more |
358 |
359 |
359 @lltrace |
360 @lltrace |
360 def __call__(self, cls, req, *args, **kwargs): |
361 def __call__(self, cls, req, *args, **kwargs): |
361 if kwargs.get('rtype') not in self.expected: |
362 if kwargs.get('rtype') not in self.expected: |
362 return 0 |
363 return 0 |