mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from _typeshed import StrOrBytesPath
|
||||
from tkinter import Button, Entry, Frame, Listbox, Misc, Scrollbar, StringVar, Toplevel, commondialog
|
||||
from typing import IO, Any, ClassVar, Iterable, Tuple
|
||||
from typing import IO, Any, ClassVar, Iterable
|
||||
from typing_extensions import Literal
|
||||
|
||||
dialogstates: dict[Any, tuple[Any, Any]]
|
||||
@@ -64,7 +64,7 @@ def asksaveasfilename(
|
||||
*,
|
||||
confirmoverwrite: bool | None = ...,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | Tuple[str, ...]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
@@ -74,7 +74,7 @@ def asksaveasfilename(
|
||||
def askopenfilename(
|
||||
*,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | Tuple[str, ...]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
@@ -84,13 +84,13 @@ def askopenfilename(
|
||||
def askopenfilenames(
|
||||
*,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | Tuple[str, ...]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
title: str | None = ...,
|
||||
typevariable: StringVar | str | None = ...,
|
||||
) -> Literal[""] | Tuple[str, ...]: ...
|
||||
) -> Literal[""] | tuple[str, ...]: ...
|
||||
def askdirectory(
|
||||
*, initialdir: StrOrBytesPath | None = ..., mustexist: bool | None = ..., parent: Misc | None = ..., title: str | None = ...
|
||||
) -> str: ... # can be empty string
|
||||
@@ -101,7 +101,7 @@ def asksaveasfile(
|
||||
*,
|
||||
confirmoverwrite: bool | None = ...,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | Tuple[str, ...]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
@@ -112,7 +112,7 @@ def askopenfile(
|
||||
mode: str = ...,
|
||||
*,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | Tuple[str, ...]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
@@ -123,11 +123,11 @@ def askopenfiles(
|
||||
mode: str = ...,
|
||||
*,
|
||||
defaultextension: str | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | Tuple[str, ...]]] | None = ...,
|
||||
filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ...,
|
||||
initialdir: StrOrBytesPath | None = ...,
|
||||
initialfile: StrOrBytesPath | None = ...,
|
||||
parent: Misc | None = ...,
|
||||
title: str | None = ...,
|
||||
typevariable: StringVar | str | None = ...,
|
||||
) -> Tuple[IO[Any], ...]: ... # can be empty tuple
|
||||
) -> tuple[IO[Any], ...]: ... # can be empty tuple
|
||||
def test() -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user