Still allow passing None to shutil.rmtree's onerror parameter on Python 3.12+ (#13478)

Resolves https://github.com/python/mypy/issues/18239
This commit is contained in:
Avasam
2025-02-08 20:46:09 -05:00
committed by GitHub
parent 1d1086018b
commit dee4ef3171

View File

@@ -83,7 +83,7 @@ class _RmtreeType(Protocol):
self,
path: StrOrBytesPath,
ignore_errors: bool,
onerror: _OnErrorCallback,
onerror: _OnErrorCallback | None,
*,
onexc: None = None,
dir_fd: int | None = None,
@@ -95,7 +95,7 @@ class _RmtreeType(Protocol):
path: StrOrBytesPath,
ignore_errors: bool = False,
*,
onerror: _OnErrorCallback,
onerror: _OnErrorCallback | None,
onexc: None = None,
dir_fd: int | None = None,
) -> None: ...