mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-14 04:14:52 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
+2
-1
@@ -13,7 +13,7 @@ from _imp import (
|
||||
from _typeshed import StrPath
|
||||
from os import PathLike
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, Protocol
|
||||
from typing import IO, Any, Protocol, type_check_only
|
||||
|
||||
SEARCH_ERROR: int
|
||||
PY_SOURCE: int
|
||||
@@ -39,6 +39,7 @@ class NullImporter:
|
||||
|
||||
# Technically, a text file has to support a slightly different set of operations than a binary file,
|
||||
# but we ignore that here.
|
||||
@type_check_only
|
||||
class _FileLike(Protocol):
|
||||
closed: bool
|
||||
mode: str
|
||||
|
||||
Reference in New Issue
Block a user