mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from _typeshed import StrOrBytesPath
|
||||
from tkinter import Button, Entry, Frame, Listbox, Misc, Scrollbar, StringVar, Toplevel, _TkinterSequence, commondialog
|
||||
from typing import IO, Any, ClassVar, Dict, Iterable, Optional, Tuple
|
||||
from typing import IO, Any, ClassVar, Dict, Iterable, Tuple
|
||||
from typing_extensions import Literal
|
||||
|
||||
dialogstates: Dict[Any, Tuple[Any, Any]]
|
||||
@@ -8,7 +8,7 @@ dialogstates: Dict[Any, Tuple[Any, Any]]
|
||||
class FileDialog:
|
||||
title: str = ...
|
||||
master: Any = ...
|
||||
directory: Optional[Any] = ...
|
||||
directory: Any | None = ...
|
||||
top: Toplevel = ...
|
||||
botframe: Frame = ...
|
||||
selection: Entry = ...
|
||||
@@ -22,21 +22,21 @@ class FileDialog:
|
||||
filter_button: Button = ...
|
||||
cancel_button: Button = ...
|
||||
def __init__(
|
||||
self, master, title: Optional[Any] = ...
|
||||
self, master, title: Any | None = ...
|
||||
) -> None: ... # title is usually a str or None, but e.g. int doesn't raise en exception either
|
||||
how: Optional[Any] = ...
|
||||
def go(self, dir_or_file: Any = ..., pattern: str = ..., default: str = ..., key: Optional[Any] = ...): ...
|
||||
def quit(self, how: Optional[Any] = ...) -> None: ...
|
||||
how: Any | None = ...
|
||||
def go(self, dir_or_file: Any = ..., pattern: str = ..., default: str = ..., key: Any | None = ...): ...
|
||||
def quit(self, how: Any | None = ...) -> None: ...
|
||||
def dirs_double_event(self, event) -> None: ...
|
||||
def dirs_select_event(self, event) -> None: ...
|
||||
def files_double_event(self, event) -> None: ...
|
||||
def files_select_event(self, event) -> None: ...
|
||||
def ok_event(self, event) -> None: ...
|
||||
def ok_command(self) -> None: ...
|
||||
def filter_command(self, event: Optional[Any] = ...) -> None: ...
|
||||
def filter_command(self, event: Any | None = ...) -> None: ...
|
||||
def get_filter(self): ...
|
||||
def get_selection(self): ...
|
||||
def cancel_command(self, event: Optional[Any] = ...) -> None: ...
|
||||
def cancel_command(self, event: Any | None = ...) -> None: ...
|
||||
def set_filter(self, dir, pat) -> None: ...
|
||||
def set_selection(self, file) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user