mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-19 22:50:29 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
@@ -2,7 +2,7 @@ import _tkinter
|
||||
import itertools
|
||||
import sys
|
||||
import tkinter
|
||||
from typing import Any, ClassVar, Final, Literal, TypedDict, overload
|
||||
from typing import Any, ClassVar, Final, Literal, TypedDict, overload, type_check_only
|
||||
from typing_extensions import TypeAlias, Unpack
|
||||
|
||||
__all__ = ["NORMAL", "ROMAN", "BOLD", "ITALIC", "nametofont", "Font", "families", "names"]
|
||||
@@ -23,6 +23,7 @@ _FontDescription: TypeAlias = (
|
||||
| _tkinter.Tcl_Obj # A font object constructed in Tcl
|
||||
)
|
||||
|
||||
@type_check_only
|
||||
class _FontDict(TypedDict):
|
||||
family: str
|
||||
size: int
|
||||
@@ -31,6 +32,7 @@ class _FontDict(TypedDict):
|
||||
underline: bool
|
||||
overstrike: bool
|
||||
|
||||
@type_check_only
|
||||
class _MetricsDict(TypedDict):
|
||||
ascent: int
|
||||
descent: int
|
||||
|
||||
Reference in New Issue
Block a user