mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-10 18:36:31 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
+3
-1
@@ -20,7 +20,7 @@ from _hashlib import (
|
||||
)
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Callable, Set as AbstractSet
|
||||
from typing import Protocol
|
||||
from typing import Protocol, type_check_only
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = (
|
||||
@@ -72,9 +72,11 @@ algorithms_guaranteed: AbstractSet[str]
|
||||
algorithms_available: AbstractSet[str]
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
@type_check_only
|
||||
class _BytesIOLike(Protocol):
|
||||
def getbuffer(self) -> ReadableBuffer: ...
|
||||
|
||||
@type_check_only
|
||||
class _FileDigestFileObj(Protocol):
|
||||
def readinto(self, buf: bytearray, /) -> int: ...
|
||||
def readable(self) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user