mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Fix false positives from @deprecated for shutil.rmtree (#12116)
This commit is contained in:
@@ -78,13 +78,25 @@ class _RmtreeType(Protocol):
|
||||
avoids_symlink_attacks: bool
|
||||
if sys.version_info >= (3, 12):
|
||||
@overload
|
||||
@deprecated("The `onerror` parameter is deprecated and will be removed in Python 3.14. Use `onexc` instead.")
|
||||
@deprecated("The `onerror` parameter is deprecated. Use `onexc` instead.")
|
||||
def __call__(
|
||||
self,
|
||||
path: StrOrBytesPath,
|
||||
ignore_errors: bool,
|
||||
onerror: _OnErrorCallback,
|
||||
*,
|
||||
onexc: None = None,
|
||||
dir_fd: int | None = None,
|
||||
) -> None: ...
|
||||
@overload
|
||||
@deprecated("The `onerror` parameter is deprecated. Use `onexc` instead.")
|
||||
def __call__(
|
||||
self,
|
||||
path: StrOrBytesPath,
|
||||
ignore_errors: bool = False,
|
||||
onerror: _OnErrorCallback | None = None,
|
||||
*,
|
||||
onerror: _OnErrorCallback,
|
||||
onexc: None = None,
|
||||
dir_fd: int | None = None,
|
||||
) -> None: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user