Coverage for stems/compat.py : 75%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" External library compatibility """ # cytoolz over toolz except ImportError: try: import toolz except ImportError: HAS_TOOLZ = False pass
""" Decorator to dependency check at function import time
Parameters ---------- module : str Module required for the function
Returns ------- callable Returns decorated function if dependency is importable, otherwise returns a dummy-function that will immediately raise an ImportError """
def inner(*args, **kwds): f'"{module}", but it is not available: {err}')
else:
|