mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Use Final for Constant Literals in the stdlib (#12332)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import _tkinter
|
||||
import sys
|
||||
import tkinter
|
||||
from typing import Any, Literal, TypedDict, overload
|
||||
from typing import Any, Final, Literal, TypedDict, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = ["NORMAL", "ROMAN", "BOLD", "ITALIC", "nametofont", "Font", "families", "names"]
|
||||
|
||||
NORMAL: Literal["normal"]
|
||||
ROMAN: Literal["roman"]
|
||||
BOLD: Literal["bold"]
|
||||
ITALIC: Literal["italic"]
|
||||
NORMAL: Final = "normal"
|
||||
ROMAN: Final = "roman"
|
||||
BOLD: Final = "bold"
|
||||
ITALIC: Final = "italic"
|
||||
|
||||
_FontDescription: TypeAlias = (
|
||||
str # "Helvetica 12"
|
||||
|
||||
Reference in New Issue
Block a user