mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Update typing_extensions imports in stdlib (#11244)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
This commit is contained in:
@@ -5,8 +5,8 @@ from collections.abc import Callable, Mapping, Sequence
|
||||
from tkinter.constants import *
|
||||
from tkinter.font import _FontDescription
|
||||
from types import TracebackType
|
||||
from typing import Any, Generic, NamedTuple, TypeVar, overload, type_check_only
|
||||
from typing_extensions import Literal, TypeAlias, TypedDict, TypeVarTuple, Unpack, deprecated
|
||||
from typing import Any, Generic, Literal, NamedTuple, TypedDict, TypeVar, overload, type_check_only
|
||||
from typing_extensions import TypeAlias, TypeVarTuple, Unpack, deprecated
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal
|
||||
|
||||
# These are not actually bools. See #4669
|
||||
NO: bool
|
||||
|
||||
@@ -2,8 +2,7 @@ import sys
|
||||
from _typeshed import Incomplete, StrOrBytesPath
|
||||
from collections.abc import Iterable
|
||||
from tkinter import Button, Entry, Frame, Listbox, Misc, Scrollbar, StringVar, Toplevel, commondialog
|
||||
from typing import IO, ClassVar
|
||||
from typing_extensions import Literal
|
||||
from typing import IO, ClassVar, Literal
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = [
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import _tkinter
|
||||
import sys
|
||||
import tkinter
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Literal, TypeAlias, TypedDict
|
||||
from typing import Any, Literal, TypedDict, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = ["NORMAL", "ROMAN", "BOLD", "ITALIC", "nametofont", "Font", "families", "names"]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import tkinter
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, Literal
|
||||
|
||||
WINDOW: Literal["window"]
|
||||
TEXT: Literal["text"]
|
||||
|
||||
@@ -3,8 +3,8 @@ import tkinter
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from tkinter.font import _FontDescription
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Literal, TypeAlias, TypedDict
|
||||
from typing import Any, Literal, TypedDict, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"Button",
|
||||
|
||||
Reference in New Issue
Block a user