mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-29 19:26:45 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import sys
|
||||
from typing import type_check_only
|
||||
|
||||
if sys.platform == "win32":
|
||||
class MSIError(Exception): ...
|
||||
# Actual typename View, not exposed by the implementation
|
||||
@type_check_only
|
||||
class _View:
|
||||
def Execute(self, params: _Record | None = ...) -> None: ...
|
||||
def GetColumnInfo(self, kind: int) -> _Record: ...
|
||||
@@ -14,6 +16,7 @@ if sys.platform == "win32":
|
||||
__init__: None # type: ignore[assignment]
|
||||
|
||||
# Actual typename SummaryInformation, not exposed by the implementation
|
||||
@type_check_only
|
||||
class _SummaryInformation:
|
||||
def GetProperty(self, field: int) -> int | bytes | None: ...
|
||||
def GetPropertyCount(self) -> int: ...
|
||||
@@ -24,6 +27,7 @@ if sys.platform == "win32":
|
||||
__init__: None # type: ignore[assignment]
|
||||
|
||||
# Actual typename Database, not exposed by the implementation
|
||||
@type_check_only
|
||||
class _Database:
|
||||
def OpenView(self, sql: str) -> _View: ...
|
||||
def Commit(self) -> None: ...
|
||||
@@ -34,6 +38,7 @@ if sys.platform == "win32":
|
||||
__init__: None # type: ignore[assignment]
|
||||
|
||||
# Actual typename Record, not exposed by the implementation
|
||||
@type_check_only
|
||||
class _Record:
|
||||
def GetFieldCount(self) -> int: ...
|
||||
def GetInteger(self, field: int) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user