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:
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer, StrPath, SupportsRead, _T_co
|
||||
from collections.abc import Iterable
|
||||
from typing import Protocol
|
||||
from typing import Protocol, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
from xml.sax._exceptions import (
|
||||
SAXException as SAXException,
|
||||
@@ -13,6 +13,7 @@ from xml.sax._exceptions import (
|
||||
from xml.sax.handler import ContentHandler as ContentHandler, ErrorHandler as ErrorHandler
|
||||
from xml.sax.xmlreader import InputSource as InputSource, XMLReader
|
||||
|
||||
@type_check_only
|
||||
class _SupportsReadClose(SupportsRead[_T_co], Protocol[_T_co]):
|
||||
def close(self) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user