pre_commit/util.py
def clean_path_on_failure(path: str) -> Generator[None, None, None]:
    """Cleans up the directory on an exceptional failure."""
    try:
        yield
    except BaseException:
        if os.path.exists(path):
            rmtree(path)
        raise
Cleans up the directory on an exceptional failure.
Cleans up the directory on an exceptional failure.
Cleans up the directory on an exceptional failure .
def clean_path_on_failure(path: str) -> Generator[None, None, None]:
    try:
        yield
    except BaseException:
        if os.path.exists(path):
            rmtree(path)
        raise
def clean_path_on_failure ( path : str ) -> Generator [ None , None , None ] : try : yield except BaseException : if os . path . exists ( path ) : rmtree ( path ) raise
Cleans up the directory on an exceptional failure.
Cleans up the directory on an exceptional failure .
"""Cleans up the directory on an exceptional failure."""
path
str