juc500 정상동작

This commit is contained in:
Macbook
2026-07-21 21:04:25 +09:00
parent ff60cee1cc
commit 1388668b56
2917 changed files with 708021 additions and 651 deletions
@@ -0,0 +1,29 @@
from __future__ import annotations
import shutil
import sys
from collections.abc import Callable
from typing import TYPE_CHECKING, Any
if TYPE_CHECKING:
from typing import TypeAlias
from _typeshed import ExcInfo, StrOrBytesPath
# Same as shutil._OnExcCallback from typeshed
_OnExcCallback: TypeAlias = Callable[[Callable[..., Any], str, BaseException], object]
def shutil_rmtree(
path: StrOrBytesPath,
ignore_errors: bool = False,
onexc: _OnExcCallback | None = None,
) -> None:
if sys.version_info >= (3, 12):
return shutil.rmtree(path, ignore_errors, onexc=onexc)
def _handler(fn: Callable[..., Any], path: str, excinfo: ExcInfo) -> None:
if onexc:
onexc(fn, path, excinfo[1])
return shutil.rmtree(path, ignore_errors, onerror=_handler)