def add_inspection(name):
    """
    Add a Jishaku object inspection
    """

    # create the real decorator
    def inspection_inner(func):
        """
        Jishaku inspection decorator
        """

        # pylint: disable=inconsistent-return-statements

        # create an encapsulated version of the inspection that swallows exceptions
        @functools.wraps(func)
        def encapsulated(*args, **kwargs):
            try:
                return func(*args, **kwargs)
            except (TypeError, AttributeError, ValueError, OSError):
                return

        INSPECTIONS.append((name, encapsulated))
        return func
    return inspection_inner
def add_inspection ( name ) : def inspection_inner ( func ) : @ functools . wraps ( func ) def encapsulated ( * args , ** kwargs ) : try : return func ( * args , ** kwargs ) except ( TypeError , AttributeError , ValueError , OSError ) : return INSPECTIONS . append ( ( name , encapsulated ) ) return func return inspection_inner
Add a Jishaku object inspection