mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-20 07:00:29 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
+2
-1
@@ -3,7 +3,7 @@ import sys
|
||||
from _typeshed import BytesPath, ExcInfo, FileDescriptorOrPath, MaybeNone, StrOrBytesPath, StrPath, SupportsRead, SupportsWrite
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from tarfile import _TarfileFilter
|
||||
from typing import Any, AnyStr, NamedTuple, NoReturn, Protocol, TypeVar, overload
|
||||
from typing import Any, AnyStr, NamedTuple, NoReturn, Protocol, TypeVar, overload, type_check_only
|
||||
from typing_extensions import TypeAlias, deprecated
|
||||
|
||||
__all__ = [
|
||||
@@ -79,6 +79,7 @@ def copytree(
|
||||
_OnErrorCallback: TypeAlias = Callable[[Callable[..., Any], str, ExcInfo], object]
|
||||
_OnExcCallback: TypeAlias = Callable[[Callable[..., Any], str, BaseException], object]
|
||||
|
||||
@type_check_only
|
||||
class _RmtreeType(Protocol):
|
||||
avoids_symlink_attacks: bool
|
||||
if sys.version_info >= (3, 12):
|
||||
|
||||
Reference in New Issue
Block a user