src/graphnet/utilities/imports.py
def requires_icecube(test_function):
    """Decorator for only exposing function if `icecube` module is present."""

    def wrapper(*args, **kwargs):
        if has_icecube_package():
            return test_function(*args, **kwargs)
        else:
            logger.info(
                f"Function `{test_function.__name__}` not used since `icecube` isn't available."
            )
            return

    wrapper.__name__ = test_function.__name__
    return wrapper
Decorator for only exposing function if `icecube` module is present.
Decorator for only exposing function if `icecube` module is present.
Decorator for only exposing function if ` icecube ` module is present .
def requires_icecube(test_function):
    def wrapper(*args, **kwargs):
        if has_icecube_package():
            return test_function(*args, **kwargs)
        else:
            logger.info(
                f"Function `{test_function.__name__}` not used since `icecube` isn't available."
            )
            return
    wrapper.__name__ = test_function.__name__
    return wrapper
def requires_icecube ( test_function ) : def wrapper ( * args , ** kwargs ) : if has_icecube_package ( ) : return test_function ( * args , ** kwargs ) else : logger . info ( f"Function `{test_function.__name__}` not used since `icecube` isn't available." ) return wrapper . __name__ = test_function . __name__ return wrapper
Decorator for only exposing function if `icecube` module is present.
Decorator for only exposing function if ` icecube ` module is present .
"""Decorator for only exposing function if `icecube` module is present."""
test_function