Searched refs:func_or_class (Results 1 – 2 of 2) sorted by relevance
24 def decorator(func_or_class): argument25 if isinstance(func_or_class, type):26 setUpClass = func_or_class.__dict__.get('setUpClass')29 super(func_or_class, cls).setUpClass()30 setUpClass.__qualname__ = func_or_class.__qualname__ + '.setUpClass'31 setUpClass.__module__ = func_or_class.__module__35 func_or_class.setUpClass = setUpClass36 return func_or_class38 @functools.wraps(func_or_class)49 return func_or_class(*args, **kwargs)
148 def deprecated_alias(deprecated_name, name, func_or_class, warn_once=True): argument202 if tf_inspect.isclass(func_or_class):205 class _NewClass(func_or_class): # pylint: disable=missing-docstring207 func_or_class.__doc__,215 __name__ = func_or_class.__name__218 @_wrap_decorator(func_or_class.__init__)222 _NewClass.__init__.__func__.__doc__ = func_or_class.__init__.__doc__225 _NewClass.__init__.__doc__ = func_or_class.__init__.__doc__241 decorator_utils.validate_callable(func_or_class, 'deprecated')244 @functools.wraps(func_or_class)[all …]