def rmtree(path):
    def handle_remove_readonly(func, path, exc):  # pragma: no cover (windows)
        excvalue = exc[1]
        if (
                func in (os.rmdir, os.remove, os.unlink) and
                excvalue.errno == errno.EACCES
        ):
            os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
            func(path)
        else:
            raise
    shutil.rmtree(path, ignore_errors=False, onerror=handle_remove_readonly)
Parameters
dataset/ETHPy150Open pre-commit/pre-commit/pre_commit/util.py/rmtree--crossover with--dataset/ETHPy150Open scikit-beam/scikit-beam/skbeam/tests/test_openness.py/get_modules_in_library