Lines Matching defs:decorator
345 def decorator(func):
359 return decorator(func)
361 return decorator
1176 example for annotating a decorator::
1182 '''A type-safe decorator to add logging to a function.'''
2533 def no_type_check_decorator(decorator):
2534 """Decorator to give another decorator the @no_type_check effect.
2536 This wraps the decorator with something that wraps the decorated
2539 @functools.wraps(decorator)
2541 func = decorator(*args, **kwds)
2620 Use this decorator to indicate to type checkers that the decorated
2639 There is no runtime checking of these properties. The decorator
3398 The decorator can be applied to a function, class, or metaclass.
3400 Example usage with a decorator function::
3440 The arguments to this decorator can be used to customize this behavior:
3452 At runtime, this decorator records its arguments in the
3458 def decorator(cls_or_fn):
3467 return decorator